Use New Methods
Dieser Commit ist enthalten in:
Ursprung
78b55e7e6c
Commit
07f3cdc4cf
@ -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);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren