SteamWar/FightSystem
Archiviert
13
1

Use New Methods

Dieser Commit ist enthalten in:
Chaoscaot 2021-01-24 15:09:48 +01:00
Ursprung 78b55e7e6c
Commit 07f3cdc4cf

Datei anzeigen

@ -148,8 +148,6 @@ public class PersonalKitCreator extends BasicListener {
}
private static void useKit(Player player, PersonalKit kit) {
PersonalKit kitUse = PersonalKit.getKitInUse(SteamwarUser.get(player.getUniqueId()).getId(), Config.SchematicType.toDB());
if(kitUse != null) kitUse.setInUse(false);
kit.setInUse(true);
player.closeInventory();
}
@ -304,8 +302,7 @@ public class PersonalKitCreator extends BasicListener {
private void close(){
openKitCreators.remove(player);
kit.setInventory(removeBadItems(player.getInventory().getContents()));
kit.setArmor(removeBadItems(player.getInventory().getArmorContents()));
kit.setContainer(removeBadItems(player.getInventory().getContents()), removeBadItems(player.getInventory().getArmorContents()));
loadBackup();
player.setGameMode(GameMode.SURVIVAL);
useKit(player, kit);