mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Fix tab complete on /enchant failing on empty key (#4215)
This commit is contained in:
parent
8e712bc827
commit
3abddd6f84
@ -277,6 +277,9 @@ public final class Enchantments {
|
||||
}
|
||||
|
||||
public static Enchantment getByName(final String name) {
|
||||
if (name == null || name.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
Enchantment enchantment = null;
|
||||
if (isFlat) { // 1.13+ only
|
||||
enchantment = Enchantment.getByKey(NamespacedKey.minecraft(name.toLowerCase()));
|
||||
|
Loading…
Reference in New Issue
Block a user