SteamWar/FightSystem
Archiviert
13
1

Add Multi Personal Kits #228

Manuell gemergt
Lixfel hat 8 Commits von multi-kits nach master 2021-01-30 16:41:54 +01:00 zusammengeführt
Nur Änderungen aus Commit 07f3cdc4cf werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -148,8 +148,6 @@ public class PersonalKitCreator extends BasicListener {
} }
private static void useKit(Player player, PersonalKit kit) { 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); kit.setInUse(true);
player.closeInventory(); player.closeInventory();
} }
@ -304,8 +302,7 @@ public class PersonalKitCreator extends BasicListener {
private void close(){ private void close(){
openKitCreators.remove(player); openKitCreators.remove(player);
kit.setInventory(removeBadItems(player.getInventory().getContents())); kit.setContainer(removeBadItems(player.getInventory().getContents()), removeBadItems(player.getInventory().getArmorContents()));
kit.setArmor(removeBadItems(player.getInventory().getArmorContents()));
loadBackup(); loadBackup();
player.setGameMode(GameMode.SURVIVAL); player.setGameMode(GameMode.SURVIVAL);
useKit(player, kit); useKit(player, kit);