From 0dc4c3cb80baaeabdc613e1b159af4203d07b7e0 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 26 May 2020 14:09:58 +0200 Subject: [PATCH] refactor: remove unused command --- .../cliffbreak/varo/commands/VaroCommand.java | 18 ------------------ .../varo/commands/VaroTabCompleter.java | 1 - .../de/cliffbreak/varo/utils/LangUtils.java | 2 -- 3 files changed, 21 deletions(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/commands/VaroCommand.java b/varo/src/main/java/de/cliffbreak/varo/commands/VaroCommand.java index bb0803b..0362a37 100644 --- a/varo/src/main/java/de/cliffbreak/varo/commands/VaroCommand.java +++ b/varo/src/main/java/de/cliffbreak/varo/commands/VaroCommand.java @@ -4,16 +4,10 @@ import java.io.IOException; import java.util.HashMap; import java.util.UUID; -import com.destroystokyo.paper.Title; - -import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import org.bukkit.event.inventory.InventoryCloseEvent.Reason; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.JSONValue; @@ -76,17 +70,6 @@ public class VaroCommand implements CommandExecutor { "§c§lFehler:§r§c beim Verbinden mit der Mojang-API ist ein Fehler aufgetreten. Eventuell sind die Mojang Server down."); e.printStackTrace(); } - } else if (args.length == 1 && args[0].equals("start")) { - sender.sendMessage("§aStarting..."); - for (final Player p : Bukkit.getServer().getOnlinePlayers()) { - // p.getInventory().clear(); //TODO: uncomment after debuging - p.closeInventory(Reason.CANT_USE); - for (final PotionEffect potion : p.getActivePotionEffects()) - p.removePotionEffect(potion.getType()); - - p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 60 * 20, 1, false, false, false)); - p.sendTitle(new Title("TODO: Title, etc")); - } } else if (args.length == 2 && args[0].equals("portal")) { if (args[1].equals("enable")) { this.plugin.setCanCreatePortal(true); @@ -154,7 +137,6 @@ public class VaroCommand implements CommandExecutor { + teamName + "§r zu setzen.\nFühre danach dieses Kommando erneut aus, um den Spawn zu setzten."); } else { sender.sendMessage("\n§6========== §b§lCliffbreak.de VARO §r§6============\n "); - sender.sendMessage("§a/varo start: §rStarte das Varo Projekt!"); sender.sendMessage("§a/varo ban [Spieler]: §rSpieler bannen"); sender.sendMessage("§a/varo unban [Spieler]: §rSpieler wieder auf den Server lassen"); sender.sendMessage("§a/varo portal [enable/disable]: §rAktiviere/Deaktiviere die Portal-Erstellung"); diff --git a/varo/src/main/java/de/cliffbreak/varo/commands/VaroTabCompleter.java b/varo/src/main/java/de/cliffbreak/varo/commands/VaroTabCompleter.java index 27a1f0a..6d2b973 100644 --- a/varo/src/main/java/de/cliffbreak/varo/commands/VaroTabCompleter.java +++ b/varo/src/main/java/de/cliffbreak/varo/commands/VaroTabCompleter.java @@ -25,7 +25,6 @@ public class VaroTabCompleter implements TabCompleter { if (args.length == 1) { list.add("unban"); list.add("ban"); - list.add("start"); list.add("portal"); list.add("addspawns"); } else if (args.length == 2 && args[0].equals("unban")) { diff --git a/varo/src/main/java/de/cliffbreak/varo/utils/LangUtils.java b/varo/src/main/java/de/cliffbreak/varo/utils/LangUtils.java index b8c1f19..e93575a 100644 --- a/varo/src/main/java/de/cliffbreak/varo/utils/LangUtils.java +++ b/varo/src/main/java/de/cliffbreak/varo/utils/LangUtils.java @@ -5,8 +5,6 @@ import java.io.IOException; import org.bukkit.configuration.file.YamlConfiguration; -import de.cliffbreak.varo.Varo; - public class LangUtils { private final File file; private final YamlConfiguration config;