mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Fix handling of empty strings passed to Block/ItemType
This commit is contained in:
parent
29fd98879d
commit
71fc98ba1c
@ -237,6 +237,10 @@ public enum BlockType {
|
||||
public static BlockType lookup(String name, boolean fuzzy) {
|
||||
String testName = name.replace(" ", "").toLowerCase();
|
||||
|
||||
if (testName.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BlockType type = lookup.get(testName);
|
||||
|
||||
if (type != null) {
|
||||
|
@ -415,6 +415,10 @@ public enum ItemType {
|
||||
public static ItemType lookup(String name, boolean fuzzy) {
|
||||
String testName = name.replace(" ", "").toLowerCase();
|
||||
|
||||
if (testName.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ItemType type = lookup.get(testName);
|
||||
|
||||
if (type != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user