Enabling/Disabling Classes VIA Commands/Events

Discussion in 'Plugin Development' started by Liutenantpickle, Nov 11, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Liutenantpickle

    Waddup Bukkit!
    Im just askin, is it possible to Enable/Disable any specific class when you trigger an event?
    like when you punch a sign like this:

    line1: [Toggle]
    line2: Class1
    line3: Disable

    This disables "Class1", and enabling it.. you know how it works :)
    Sooo.. Is this possible to make?
     
  2. Offline

    Liutenantpickle

  3. Offline

    andf54

    I'm assuming by classes you mean warror mage etc.

    And yes, it can be done. Keep a HashMap<playerName, class>.
    Each time a player gets hit or does something relevant, you forward that event to players class.

    When you punch a sign just put/remove a class to/from the map.
     
Thread Status:
Not open for further replies.

Share This Page