mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-23 02:35:28 +01:00
Made getKit not case sensitive.
This commit is contained in:
parent
382ecc4787
commit
1edfdf93a2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user