From 353243e42bcf1b5cf670824bad2ef7ccc4565c9f Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 20 Aug 2022 17:47:44 +0200 Subject: [PATCH] Remove ForceResourcepack Signed-off-by: Lixfel --- .../de/steamwar/fightsystem/FightSystem.java | 1 - .../fightsystem/FightSystem.properties | 1 - .../fightsystem/FightSystem_de.properties | 1 - .../fightsystem/listener/ResourcePack.java | 35 ------------------- 4 files changed, 38 deletions(-) delete mode 100644 FightSystem_Core/src/de/steamwar/fightsystem/listener/ResourcePack.java diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java index b449484..f5e2d78 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java @@ -77,7 +77,6 @@ public class FightSystem extends JavaPlugin { new DenyInventoryMovement(); new EventJoin(); new Recording(); - //new ResourcePack(); new Check(); new Shutdown(); new SetupQuit(); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties index ae4ae52..126d650 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties @@ -145,7 +145,6 @@ NO_FRIENDLY_FIRE=§cNo friendly fire allowed NO_TNT_PLACE=§cYou are not allowed to place tnt NO_TELEPORT=§cYou are not allowed to use this teleport function OPEN_INVENTORY_TO_CUSTOMIZE=§eOpen inventory to customize your kit -RESOURCEPACK_REQUIRED=§cYou can only join on the event server with the SteamWar resourcepack\n§cPlease allow the use of server resourcepacks in the server list! NO_ENTERN=§cYou may not board NO_TEAMAREA=§cYou are not allowed in the team area TEST_BECOME_LEADER=§7Become a team leader with §8/§eleader diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties index 166ddc8..082f69f 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties @@ -142,7 +142,6 @@ NO_FRIENDLY_FIRE=§cDu darfst deinen Teamkollegen keinen Schaden zufügen NO_TNT_PLACE=§cDu darfst kein TNT setzen NO_TELEPORT=§cDu darfst diese Teleportfunktion nicht benutzen OPEN_INVENTORY_TO_CUSTOMIZE=§eInventar zum Anpassen des Kits öffnen -RESOURCEPACK_REQUIRED=§cAuf Eventserver kann nur mit dem SteamWar-Resourcepack beigetreten werden\n§cDa du abgelehnt hast, musst du nun in der Serverliste erst einmal wieder Ressourcenpakete von SteamWar aktivieren NO_ENTERN=§cDu darfst nicht entern NO_TEAMAREA=§cDu darfst nicht zu den Teams TEST_BECOME_LEADER=§7Werde zum Teamleader mit §8/§eleader diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/ResourcePack.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/ResourcePack.java deleted file mode 100644 index 80bb614..0000000 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/ResourcePack.java +++ /dev/null @@ -1,35 +0,0 @@ -package de.steamwar.fightsystem.listener; - -import de.steamwar.fightsystem.ArenaMode; -import de.steamwar.fightsystem.FightSystem; -import de.steamwar.fightsystem.states.FightState; -import de.steamwar.fightsystem.states.StateDependentListener; -import de.steamwar.fightsystem.utils.CraftbukkitWrapper; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerResourcePackStatusEvent; - -public class ResourcePack implements Listener { - - public ResourcePack(){ - new StateDependentListener(ArenaMode.Event, FightState.All, this); - } - - @EventHandler - public void handlePlayerJoin(PlayerJoinEvent event) { - Player player = event.getPlayer(); - CraftbukkitWrapper.impl.sendResourcePack(player, "https://steamwar.de/antixray.zip", "3e94f5abeb07cc95067b27705615ec14666abe7b"); - } - - @EventHandler - public void onResourcepack(PlayerResourcePackStatusEvent e){ - if(e.getStatus() == PlayerResourcePackStatusEvent.Status.ACCEPTED || e.getStatus() == PlayerResourcePackStatusEvent.Status.SUCCESSFULLY_LOADED) - return; - - Player player = e.getPlayer(); - FightSystem.getMessage().sendPrefixless("RESOURCEPACK_REQUIRED", player); - player.kickPlayer(null); - } -}