SteamWar/SpigotCore
Archiviert
13
0

Fix Order and Change Fuction

Dieser Commit ist enthalten in:
Chaoscaot 2021-01-24 15:09:13 +01:00
Ursprung 234671a8b0
Commit fe050d76a4

Datei anzeigen

@ -84,7 +84,7 @@ public class PersonalKit {
list.add(new PersonalKit(rs)); list.add(new PersonalKit(rs));
if(list.size() > 1) { if(list.size() > 1) {
list.forEach(kit -> { list.forEach(kit -> {
if(list.indexOf(kit) >= 1) kit.setInUse(false); if(list.indexOf(kit) >= 1) kit.setUse(false);
}); });
list.removeIf(kit -> !kit.isInUse()); list.removeIf(kit -> !kit.isInUse());
} }
@ -129,10 +129,10 @@ public class PersonalKit {
} }
public void setInUse(boolean inUse) { public void setInUse(boolean inUse) {
setUse(inUse);
PersonalKit kit = getKitInUse(userID, gamemode); PersonalKit kit = getKitInUse(userID, gamemode);
if(kit != null) if(kit != null)
kit.setUse(inUse); kit.setUse(inUse);
setUse(inUse);
} }
private void setUse(boolean inUse) { private void setUse(boolean inUse) {