Made getKit not case sensitive.

This commit is contained in:
Brianna 2019-08-13 20:22:57 -04:00
parent 382ecc4787
commit 1edfdf93a2

View File

@ -54,9 +54,8 @@ public final class KitManager {
}
public Kit getKit(String name) {
for (Kit kit : registeredKits)
if (kit.getName().equalsIgnoreCase(name)) return kit;
return null;
return registeredKits.stream().filter(kit -> kit.getName().equalsIgnoreCase(name.trim()))
.findFirst().orElse(null);
}
public KitBlockData getKit(Location location) {