DiabloDrops

DiabloDrops

41.7k Downloads

Commented Stacktrace.

deathmarine opened this issue ยท 2 comments

commented

Caused by: java.lang.IllegalArgumentException: Enchantment level is either too low or too high (given 6, bounds are 1 to 1)
at org.bukkit.inventory.ItemStack.addEnchantment(ItemStack.java:299)
at com.modcrafting.diablodrops.drops.DropsAPI.getItem(DropsAPI.java:74)
at com.modcrafting.diablodrops.drops.DropsAPI.getItem(DropsAPI.java:140)
at com.modcrafting.diablodrops.listeners.KillListener.onSpawn(KillListener.java:68)
at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339)
... 12 more

Possibly a configuration or the makeSafe() Method.

Recommend using a sanity check on what configuration is allowed.

commented

I'm assuming this came from version 0.3? If so, it probably doesn't have the code that I put in that lets it actually have whatever enchants it wants/needs without throwing arguments.

commented

Yah I saw that. I just wanted to document it so the ticket system can be used. (Redirected tickets to Github.) That and kinda maybe me think to add absolutes to integers to keep them from adding negative enchantments (which on Random() will throw an IllegalArgumentException that we are already trying to catch.)
Commit:25c9374