OtherDrops

226k Downloads

2.0 - toolexcept doesn't work?

Zarius opened this issue ยท 4 comments

commented
  STONE: #1
                - tool: ANY_PICKAXE
                  toolexcept: GOLD_PICKAXE
                  drop: COBBLESTONE

results in:

09:58:57 [SEVERE] Error occurred while enabling OtherDrops v2.0-prerelease4 (Is it up to date?): null
java.lang.NullPointerException
    at com.gmail.zariust.otherdrops.subject.ToolAgent.isEqual(ToolAgent.java:42)
    at com.gmail.zariust.otherdrops.subject.ToolAgent.equals(ToolAgent.java:54)
    at java.util.HashMap.put(HashMap.java:376)
    at com.gmail.zariust.otherdrops.OtherDropsConfig.parseAgentFrom(OtherDropsConfig.java:589)
    at com.gmail.zariust.otherdrops.OtherDropsConfig.loadConditions(OtherDropsConfig.java:294)
    at com.gmail.zariust.otherdrops.OtherDropsConfig.loadBlockDrops(OtherDropsConfig.java:280)
    at com.gmail.zariust.otherdrops.OtherDropsConfig.loadDropsFile(OtherDropsConfig.java:260)
    at com.gmail.zariust.otherdrops.OtherDropsConfig.loadConfig(OtherDropsConfig.java:177)
    at com.gmail.zariust.otherdrops.OtherDropsConfig.load(OtherDropsConfig.java:117)
    at com.gmail.zariust.otherdrops.OtherDrops.onEnable(OtherDrops.java:215)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:885)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
commented

I see this is an error in the parsing, so perhaps tool: -TOOL does work? Looks like something simple to fix, anyway.

commented

Yeah, hoping it's easy to fix - haven't looked yet, just posted here so I don't forget :)

commented

Note: toolexcept works with tool: ANY but not with tool: ANY_PICKAXE (get the same error with [ANY_PICKAXE, -GOLD_PICKAXE]).

commented

Fixed in 620974e