Fix Freeze Exceptions
Dieser Commit ist enthalten in:
Ursprung
dfb6770453
Commit
180ab0f8a4
@ -54,6 +54,12 @@ public class CommandFreeze extends RegionToggleCommand {
|
||||
@EventHandler
|
||||
public void onEntitySpawn(EntitySpawnEvent e) {
|
||||
if (Region.getRegion(e.getLocation()).isFreeze()) e.setCancelled(true);
|
||||
if (Core.getVersion() == 15) return;
|
||||
if (e.isCancelled()) {
|
||||
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), () -> {
|
||||
e.getLocation().getBlock().setType(Material.TNT, false);
|
||||
}, 1L);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -70,12 +76,6 @@ public class CommandFreeze extends RegionToggleCommand {
|
||||
@EventHandler
|
||||
public void onEntityChangeBlock(EntityChangeBlockEvent e) {
|
||||
if (Region.getRegion(e.getBlock().getLocation()).isFreeze()) e.setCancelled(true);
|
||||
if (Core.getVersion() == 15) return;
|
||||
if (e.isCancelled()) {
|
||||
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), () -> {
|
||||
e.getBlock().setType(Material.TNT, false);
|
||||
}, 1L);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren