From 689ae7562e87f05ad09239e225495454b08dfccb Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 25 Mar 2021 12:33:53 +0100 Subject: [PATCH] Fix pr stuff --- .../commands/CommandRedstoneTester.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java index 356e70f..08c794a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRedstoneTester.java @@ -24,7 +24,7 @@ import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.world.RedstoneListener; import de.steamwar.bausystem.world.Welt; -import de.steamwar.core.Core; +import de.steamwar.core.VersionedRunnable; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -45,17 +45,15 @@ public class CommandRedstoneTester implements CommandExecutor { if (!(commandSender instanceof Player)) return false; Player player = (Player) commandSender; - if (Core.getVersion() >= 15) { + VersionedRunnable.call(new VersionedRunnable(() -> { player.sendMessage(BauSystem.PREFIX + "Der RedstoneTester ist nicht in der 1.12 verfügbar"); - return false; - } - - if (!permissionCheck(player)) { - return false; - } - - player.sendMessage(BauSystem.PREFIX + "Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten"); - SWUtils.giveItemToPlayer(player, RedstoneListener.WAND); + }, 8), new VersionedRunnable(() -> { + if (!permissionCheck(player)) { + return; + } + player.sendMessage(BauSystem.PREFIX + "Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten"); + SWUtils.giveItemToPlayer(player, RedstoneListener.WAND); + }, 15)); return false; }