Apply a #trim() to the Item-Type-Input KitEditorGUI to avoid the default
The GUI has the input set to ` ` by default which causes many players to send ` DIRT` instead. SD-8423
This commit is contained in:
parent
403440a684
commit
d74d0bdf79
7
pom.xml
7
pom.xml
|
@ -80,13 +80,6 @@
|
|||
<exclude>LICENSE.**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
|
||||
<!--<filter>-->
|
||||
<!-- <artifact>org.jetbrains:annotations</artifact>-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <exclude>**</exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!--</filter>-->
|
||||
</filters>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -394,9 +394,9 @@ public class KitEditorGui extends DoubleGui {
|
|||
AnvilGui gui = new AnvilGui(player, this);
|
||||
gui.setTitle("Enter a Material");
|
||||
gui.setAction(event -> {
|
||||
CompatibleMaterial compatibleMaterial = CompatibleMaterial.getMaterial(gui.getInputText());
|
||||
CompatibleMaterial compatibleMaterial = CompatibleMaterial.getMaterial(gui.getInputText().trim());
|
||||
if (compatibleMaterial == null) {
|
||||
player.sendMessage(gui.getInputText() + " is not a valid material.");
|
||||
player.sendMessage("'" + gui.getInputText().trim() + "' is not a valid material.");
|
||||
} else {
|
||||
Material material = compatibleMaterial.getMaterial();
|
||||
KitItem newItem = new KitItem(itemStack);
|
||||
|
|
Loading…
Reference in New Issue