Skip to content

Commit

Permalink
fix EnchantmentCompat matching
Browse files Browse the repository at this point in the history
  • Loading branch information
ds58 committed Oct 21, 2019
1 parent 22c3b87 commit 3741056
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ public enum EnchantmentCompat {
}

public static EnchantmentCompat getByNamedKey(String namedKey) {
namedKey = namedKey.toLowerCase();

for (EnchantmentCompat enchantmentCompat : EnchantmentCompat.values()) {
if (enchantmentCompat.namedKey.equals(namedKey)) {
if (enchantmentCompat.namedKey.contains(namedKey)) {
return enchantmentCompat;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public final class NbtChecks {
private static final Map<String, NbtCheck> checks = new HashMap<>();

static {
// vanilla
register(new NbtCheck_Unbreakable());
register(new NbtCheck_CanDestroy());
register(new NbtCheck_CanPlaceOn());
Expand Down

0 comments on commit 3741056

Please sign in to comment.