Lootables input accepts lowercase entries (#32)

Make it so the lootables AnvilGUI can take in lowercase names for items.
This commit is contained in:
ItsAZZA 2021-12-18 01:39:06 +02:00 committed by GitHub
parent 331f77b65d
commit 3d58c0777e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ public class GuiLootableEditor extends Gui {
gui.setAction((event1 -> {
try {
lootable.registerLoot(new LootBuilder().setMaterial(CompatibleMaterial
.valueOf(gui.getInputText().trim())).build());
.valueOf(gui.getInputText().trim().toUpperCase())).build());
} catch (IllegalArgumentException ex) {
event.player.sendMessage("That is not a valid material.");
}