Solved GetDurability doesnt work?

Discussion in 'Plugin Development' started by Qaez, Dec 3, 2013.

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

    Qaez

    haha ok sorry, but anyway I already did that in my main class :

    Code:java
    1. package me.robbertie187.FireworkTest;
    2.  
    3. import org.bukkit.plugin.java.JavaPlugin;
    4.  
    5. import java.util.ArrayList;
    6. import java.util.List;
    7. import java.util.logging.Logger;
    8.  
    9. public class FTMain extends JavaPlugin {
    10. private FTListener castSpell = new FTListener(this);
    11. private selectSpell selectSpell = new selectSpell(this);
    12. Logger logger = Logger.getLogger("Minecraft");
    13. FTCommands fc = new FTCommands();
    14. public ArrayList<String> confuse = new ArrayList<String>();
    15. public ArrayList<String> comet = new ArrayList<String>();
    16. public static FTMain plugin;
    17.  
    18. @Override
    19. public void onEnable() {
    20. plugin = this;
    21. getServer().getPluginManager().registerEvents(castSpell, this);
    22. getServer().getPluginManager().registerEvents(selectSpell, this);
    23. confuse.add("Confuse");
    24. comet.add("Comet");
    25. getCommand("wand").setExecutor(fc);
    26. logger.info("[Magic Wand] has been enabled!");
    27. }
    28.  
    29. @Override
    30. public void onDisable() {
    31. logger.info("[Magic Wand] has been disabled!");
    32. }
    33. }
    34.  
     
  2. Offline

    NathanWolf

    Hm- ... I'm not sure about this, but maybe you need to call setItemMeta after changing the lore? Worth a try, anyway.

    Otherwise this all looks good to me... as for it not casting- you're choosing what to cast based on the player's counter value?
     
  3. Offline

    Qaez

    NathanWolf HOLY SHIT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS FIXED MY PROBLEM!!! You are one of the most kind guys that I know on the internet!
     
    NathanWolf likes this.
Thread Status:
Not open for further replies.

Share This Page