Fix pr stuff
Dieser Commit ist enthalten in:
Ursprung
1f4eae127a
Commit
0b32638779
@ -23,6 +23,7 @@ import de.steamwar.bausystem.commands.*;
|
||||
import de.steamwar.bausystem.world.*;
|
||||
import de.steamwar.core.CommandRemover;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.VersionedRunnable;
|
||||
import de.steamwar.scoreboard.SWScoreboard;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -99,9 +100,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
getCommand("script").setExecutor(new CommandScript());
|
||||
getCommand("simulator").setExecutor(new CommandSimulator());
|
||||
getCommand("simulator").setTabCompleter(new CommandSimulatorTabCompleter());
|
||||
if (Core.getVersion() >= 15) {
|
||||
getCommand("redstonetester").setExecutor(new CommandRedstoneTester());
|
||||
}
|
||||
getCommand("redstonetester").setExecutor(new CommandRedstoneTester());
|
||||
getCommand("gui").setExecutor(new CommandGUI());
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(this, this);
|
||||
@ -112,9 +111,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
Bukkit.getPluginManager().registerEvents(new TNTSimulatorListener(), this);
|
||||
Bukkit.getPluginManager().registerEvents(new CommandGUI(), this);
|
||||
Bukkit.getPluginManager().registerEvents(new DetonatorListener(), this);
|
||||
if (Core.getVersion() >= 15) {
|
||||
Bukkit.getPluginManager().registerEvents(new RedstoneListener(), this);
|
||||
}
|
||||
VersionedRunnable.call(new VersionedRunnable(() -> Bukkit.getPluginManager().registerEvents(new RedstoneListener(), this), 15));
|
||||
new AFKStopper();
|
||||
|
||||
autoShutdown = Bukkit.getScheduler().runTaskLater(this, Bukkit::shutdown, 1200);
|
||||
|
@ -81,11 +81,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
||||
if (Welt.noPermission(player, Permission.build))
|
||||
return;
|
||||
player.closeInventory();
|
||||
if (Core.getVersion() >= 15) {
|
||||
player.performCommand("redstonetester");
|
||||
} else {
|
||||
player.sendMessage(BauSystem.PREFIX + "Der RedstoneTester ist nicht in der 1.12 verfügbar");
|
||||
}
|
||||
player.performCommand("redstonetester");
|
||||
});
|
||||
|
||||
inv.setItem(40, getMaterial("WOODEN_AXE", "WOOD_AXE"), "§eWorldedit Axt", getNoPermsLore(Arrays.asList("§8//§7wand"), player, "§cDu hast keine Worldeditrechte", Permission.worldedit), false, clickType -> {
|
||||
|
@ -24,6 +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 org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -44,6 +45,10 @@ public class CommandRedstoneTester implements CommandExecutor {
|
||||
if (!(commandSender instanceof Player))
|
||||
return false;
|
||||
Player player = (Player) commandSender;
|
||||
if (Core.getVersion() >= 15) {
|
||||
player.sendMessage(BauSystem.PREFIX + "Der RedstoneTester ist nicht in der 1.12 verfügbar");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!permissionCheck(player)) {
|
||||
return false;
|
||||
|
@ -100,7 +100,7 @@ public class RedstoneListener implements Listener {
|
||||
private boolean validBlock(Player player, BlockData block) {
|
||||
if (block instanceof Powerable) return true;
|
||||
if (block instanceof Piston) return true;
|
||||
player.sendMessage(BauSystem.PREFIX + "Unbekannte Position");
|
||||
player.sendMessage(BauSystem.PREFIX + "§cUnbekannte Position");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren