Skip to content

Commit

Permalink
Update enchantment string parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
PikaMug committed Jan 17, 2024
1 parent 357f2bc commit 4aa6d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/me/pikamug/localelib/LocaleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public Map<Enchantment, String> queryEnchantments(final Map<Enchantment, Integer
} else {
for (final Enchantment e : enchantments.keySet()) {
final String str = e.toString();
enchantKeys.put(e, "enchantment.minecraft." + str.substring(str.indexOf(":") + 1, str.indexOf(",")));
enchantKeys.put(e, "enchantment.minecraft." + str.substring(str.indexOf(":") + 1, str.indexOf("]")).split(", ")[0]);
}
}
return enchantKeys;
Expand Down

0 comments on commit 4aa6d79

Please sign in to comment.