From d86122a278ee25a360f4180b209edbf539ea4c26 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 28 Dec 2020 17:37:38 +0100 Subject: [PATCH] Fixing old Dependencies --- src/de/steamwar/bungeecore/commands/TeamCommand.java | 5 +++-- src/de/steamwar/bungeecore/inventory/SWListInv.java | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index fa16480..aa72487 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -20,9 +20,10 @@ package de.steamwar.bungeecore.commands; import de.steamwar.bungeecore.BungeeCore; +import de.steamwar.bungeecore.comms.packets.CloseInventoryPacket; +import de.steamwar.bungeecore.inventory.SWInventory; import de.steamwar.bungeecore.inventory.SWItem; import de.steamwar.bungeecore.inventory.SWListInv; -import de.steamwar.bungeecore.schematic.SchemGUI; import de.steamwar.bungeecore.sql.Event; import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.Team; @@ -529,7 +530,7 @@ public class TeamCommand extends BasicCommand { COLOR_CODES.forEach(stringSWListEntry -> colors.add(new SWListInv.SWListEntry<>(stringSWListEntry.getItem().setName(stringSWListEntry.getItem().getTitle() + Team.get(user.getTeam()).getTeamKuerzel()), stringSWListEntry.getObject()))); SWListInv inv = new SWListInv<>(player, "§6Farbe wählen", colors, (click, element) -> { - SchemGUI.closeInventory(player); + SWListInv.closeInventory(player); team.setTeamColor(element); }); inv.open(); diff --git a/src/de/steamwar/bungeecore/inventory/SWListInv.java b/src/de/steamwar/bungeecore/inventory/SWListInv.java index bd43730..e10925c 100644 --- a/src/de/steamwar/bungeecore/inventory/SWListInv.java +++ b/src/de/steamwar/bungeecore/inventory/SWListInv.java @@ -19,8 +19,10 @@ package de.steamwar.bungeecore.inventory; +import de.steamwar.bungeecore.comms.packets.CloseInventoryPacket; import de.steamwar.bungeecore.sql.Schematic; import de.steamwar.bungeecore.sql.SchematicType; +import de.steamwar.bungeecore.sql.SteamwarUser; import net.md_5.bungee.BungeeCord; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -142,4 +144,8 @@ public class SWListInv extends SWInventory { return object; } } + + public static void closeInventory(ProxiedPlayer player) { + new CloseInventoryPacket(SteamwarUser.get(player).getId()).send(player); + } }