Merge pull request 'Prevent hanging destruction' (#335) from preventHangingDestruct into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #335 Reviewed-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Commit
c9fc554dcd
@ -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();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren