diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index d96921e..1281ae1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -63,6 +63,8 @@ public class BauSystem extends JavaPlugin implements Listener { owner = null; } + Mapper.init(); + try { CommandRemover.removeAll("tp", "gamemode", "time", "clear"); CommandInjector.injectCommand(new CommandTeleport()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java index 0b9ce00..3a48e27 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java @@ -35,7 +35,7 @@ import static de.steamwar.bausystem.world.TPSUtils.getTps; public class CommandInfo extends SWCommand { public CommandInfo() { - super("bauinfo", "info"); + super("bauinfo"); } @Register diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandLockschem.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandLockschem.java index 6ac4742..75fca1e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandLockschem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandLockschem.java @@ -30,6 +30,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class CommandLockschem implements CommandExecutor { + @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (!(sender instanceof Player)) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java index d3fe7d1..5859ba6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java @@ -39,9 +39,7 @@ public class CommandRedstoneTester extends SWCommand { VersionedRunnable.call(new VersionedRunnable(() -> { p.sendMessage(BauSystem.PREFIX + "Der RedstoneTester ist nicht in der 1.12 verfügbar"); }, 8), new VersionedRunnable(() -> { - if (!permissionCheck(p)) { - return; - } + if (!permissionCheck(p)) return; p.sendMessage(BauSystem.PREFIX + "Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten"); SWUtils.giveItemToPlayer(p, RedstoneListener.WAND); }, 15)); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java index 24a8b51..470e2b6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSkull.java @@ -39,7 +39,7 @@ public class CommandSkull extends SWCommand { } @Register - public void giveHelp(Player p, String skull) { + public void giveCommand(Player p, String skull) { ItemStack is = SWItem.getPlayerSkull(skull).getItemStack(); SkullMeta sm = (SkullMeta) is.getItemMeta(); assert sm != null; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTNT.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTNT.java index 0909302..bda7dfc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTNT.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTNT.java @@ -67,7 +67,6 @@ public class CommandTNT extends SWCommand implements Listener { tntToggle(region, null, null); } - @Register public void setCommand(Player p, TNTMode tntMode) { if (!permissionCheck(p)) return; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java index e589a68..62ccaba 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTPSLimiter.java @@ -52,7 +52,7 @@ public class CommandTPSLimiter extends SWCommand { private BukkitTask tpsLimiter = null; - private List arguments = new ArrayList<>(Arrays.asList("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")); + private List arguments = new ArrayList<>(Arrays.asList("0,5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")); public CommandTPSLimiter() { super("tpslimit"); @@ -76,20 +76,15 @@ public class CommandTPSLimiter extends SWCommand { } @Register - public void valueCommand(Player p, String tpsLimit) { + public void valueCommand(Player p, double tpsLimitDouble) { if (!permissionCheck(p)) return; - try { - double tpsLimitDouble = Double.parseDouble(tpsLimit.replace(',', '.')); - if (tpsLimitDouble < 0.5 || tpsLimitDouble > (TPSUtils.isWarpAllowed() ? 40 : 20)) { - sendInvalidArgumentMessage(p); - return; - } - currentTPSLimit = tpsLimitDouble; - sendNewTPSLimitMessage(); - tpsLimiter(); - } catch (NumberFormatException e) { + if (tpsLimitDouble < 0.5 || tpsLimitDouble > (TPSUtils.isWarpAllowed() ? 40 : 20)) { sendInvalidArgumentMessage(p); + return; } + currentTPSLimit = tpsLimitDouble; + sendNewTPSLimitMessage(); + tpsLimiter(); } @ClassMapper(value = double.class, local = true) @@ -98,7 +93,7 @@ public class CommandTPSLimiter extends SWCommand { try { return Double.parseDouble(s.replace(',', '.')); } catch (NumberFormatException e) { - return null; + return 0D; } }, s -> arguments); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java index 9c2bb3b..fc32547 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java @@ -43,7 +43,7 @@ public class CommandTrace extends SWCommand { p.sendMessage("§8/§etrace stop §8- §7Stoppt den TNT-Tracer"); p.sendMessage("§8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart"); p.sendMessage("§8/§etrace show gui §8- §7Zeigt die Trace show gui"); - p.sendMessage("§8/§etrace show §8<§edefault§8|§eadvanced§8> §8<§e-water§8|§e-interpolate-xz§8|§e-interpolate-y§8> §8- §7Zeigt alle TNT-Positionen"); + p.sendMessage("§8/§etrace show §8<§e-water§8|§e-interpolate-xz§8|§e-interpolate-y§8> §8- §7Zeigt alle TNT-Positionen"); p.sendMessage("§8/§etrace hide §8- §7Versteckt alle TNT-Positionen"); p.sendMessage("§8/§etrace delete §8- §7Löscht alle TNT-Positionen"); // p.sendMessage("§8/§etrace list §8<§7FRAME-ID§8> §8- §7Listet alle TNT auf");