SteamWar/FightSystem
Archiviert
13
1

Prevent hanging destruction
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-03-05 12:39:42 +01:00
Ursprung 8bd0d1c2a2
Commit dfca0c4ce8

Datei anzeigen

@ -33,6 +33,7 @@ import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.hanging.HangingBreakEvent;
import org.bukkit.event.player.PlayerKickEvent;
public class DenyWorldInteraction implements Listener {
@ -51,6 +52,13 @@ public class DenyWorldInteraction implements Listener {
}
}
@EventHandler
public void handleHangingBreak(HangingBreakEvent event) {
if(Config.ArenaRegion.inRegion(event.getEntity().getLocation())) {
event.setCancelled(true);
}
}
@EventHandler
public void handleBlockPlace(BlockPlaceEvent event) {
Player player = event.getPlayer();