mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 08:36:45 +01:00
Wrap 1.9 enchant defs in if statements for 1.8 compatibility
This takes care of the NoSuchField errors on initialization of EnchantmentUtils with 1.8 versions of Bukkit.
This commit is contained in:
parent
eb3f7568f2
commit
728e89257c
@ -31,9 +31,13 @@ public class EnchantmentUtils {
|
|||||||
enchants.put("FLAME", Enchantment.ARROW_FIRE);
|
enchants.put("FLAME", Enchantment.ARROW_FIRE);
|
||||||
enchants.put("KNOCKBACK", Enchantment.KNOCKBACK);
|
enchants.put("KNOCKBACK", Enchantment.KNOCKBACK);
|
||||||
enchants.put("THORNS", Enchantment.THORNS);
|
enchants.put("THORNS", Enchantment.THORNS);
|
||||||
enchants.put("MENDING", Enchantment.MENDING);
|
if (Enchantment.getByName("MENDING") != null) {
|
||||||
|
enchants.put("MENDING", Enchantment.MENDING);
|
||||||
|
}
|
||||||
enchants.put("DEPTH_STRIDER", Enchantment.DEPTH_STRIDER);
|
enchants.put("DEPTH_STRIDER", Enchantment.DEPTH_STRIDER);
|
||||||
enchants.put("FROST_WALKER", Enchantment.FROST_WALKER);
|
if (Enchantment.getByName("FROST_WALKER") != null) {
|
||||||
|
enchants.put("FROST_WALKER", Enchantment.FROST_WALKER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user