SteamWar/BauSystem2.0
Archiviert
12
0

Fix RedstonetesterUtils.validBlock

Dieser Commit ist enthalten in:
yoyosource 2021-04-17 16:46:23 +02:00
Ursprung 5bc1bc544a
Commit 627d44c02a
3 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -28,7 +28,6 @@ import de.steamwar.core.VersionedRunnable;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@Linked(LinkageType.COMMAND) @Linked(LinkageType.COMMAND)
public class RedstonetesterCommand extends SWCommand { public class RedstonetesterCommand extends SWCommand {

Datei anzeigen

@ -34,10 +34,10 @@ import org.bukkit.Material;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.Powerable; import org.bukkit.block.data.Powerable;
import org.bukkit.block.data.type.Piston; import org.bukkit.block.data.type.Piston;
import org.bukkit.block.data.type.RedstoneWire;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@UtilityClass @UtilityClass
public class RedstonetesterUtils { public class RedstonetesterUtils {
@ -57,6 +57,7 @@ public class RedstonetesterUtils {
public boolean validBlock(Player player, BlockData block) { public boolean validBlock(Player player, BlockData block) {
if (block instanceof Powerable) return true; if (block instanceof Powerable) return true;
if (block instanceof Piston) return true; if (block instanceof Piston) return true;
if (block instanceof RedstoneWire) return true;
player.sendMessage(BauSystem.PREFIX + ChatColor.RED + "Unbekannte Position"); player.sendMessage(BauSystem.PREFIX + ChatColor.RED + "Unbekannte Position");
return false; return false;
} }

Datei anzeigen

@ -35,7 +35,6 @@ import org.bukkit.event.block.BlockRedstoneEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
@Linked(LinkageType.LISTENER) @Linked(LinkageType.LISTENER)
public class RestonetesterListener implements Listener { public class RestonetesterListener implements Listener {