SteamWar/BauSystem2.0
Archiviert
12
0

Fix TestblockCommand permission
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Fix XrayCommand destroy block on right click

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-09-18 17:26:44 +02:00
Ursprung a59bf7345f
Commit 292907b735
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -159,7 +159,7 @@ public class TestblockCommand extends SWCommand {
@ClassValidator(value = Player.class, local = true) @ClassValidator(value = Player.class, local = true)
public TypeValidator<Player> validator() { public TypeValidator<Player> validator() {
return (commandSender, player, messageSender) -> !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), "REGION_TB_NO_PERMS"); return (commandSender, player, messageSender) -> !messageSender.send(!Permission.hasPermission(player, Permission.WORLDEDIT), "REGION_TB_NO_PERMS");
} }
private Region regionCheck(Player player) { private Region regionCheck(Player player) {

Datei anzeigen

@ -131,6 +131,7 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen
@EventHandler @EventHandler
public void onPlayerInteract(PlayerInteractEvent event) { public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return; if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
if (!event.hasItem() || event.getItem().getType().isAir()) return;
Region region = Region.getRegion(event.getPlayer().getLocation()); Region region = Region.getRegion(event.getPlayer().getLocation());
if (!(hidden.containsKey(region) && hidden.get(region).contains(event.getPlayer()))) { if (!(hidden.containsKey(region) && hidden.get(region).contains(event.getPlayer()))) {
return; return;