SteamWar/BauSystem2.0
Archiviert
12
0

Fix FreezeListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-07-30 11:29:38 +02:00
Ursprung c128a3594c
Commit d5f4503e08
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -1272,3 +1272,9 @@ TECHHIDER_HELP = §8/§etechhider §8- §7Toggle Techhider
TECHHIDER_GLOBAL = §cNo techhider in global region TECHHIDER_GLOBAL = §cNo techhider in global region
TECHHIDER_ON = §aTechhider activated TECHHIDER_ON = §aTechhider activated
TECHHIDER_OFF = §aTechhider deactivated TECHHIDER_OFF = §aTechhider deactivated
# XRAY
XRAY_HELP = §8/§exray §8- §7Toggle Xray
XRAY_GLOBAL = §cNo xray in global region
XRAY_ON = §aXray activated
XRAY_OFF = §aXray deactivated

Datei anzeigen

@ -103,7 +103,7 @@ public class FreezeListener implements Listener {
@EventHandler @EventHandler
public void onBlockBreak(BlockBreakEvent e) { public void onBlockBreak(BlockBreakEvent e) {
if (Core.getVersion() < 19) return; if (Core.getVersion() < 19) return;
if (e.getPlayer().getItemInUse() != null && e.getPlayer().getItemInUse().getType() == Material.DEBUG_STICK) return; if (e.getPlayer().getInventory().getItemInMainHand().getType() == Material.DEBUG_STICK) return;
if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) {
e.setCancelled(true); e.setCancelled(true);
e.getBlock().setType(Material.AIR, false); e.getBlock().setType(Material.AIR, false);