Fix Freeze in 1.12 #182
@ -54,16 +54,14 @@ public class CommandFreeze extends RegionToggleCommand {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onEntitySpawn(EntitySpawnEvent e) {
|
public void onEntitySpawn(EntitySpawnEvent e) {
|
||||||
if (Region.getRegion(e.getLocation()).isFreeze()) {
|
if (!Region.getRegion(e.getLocation()).isFreeze()) return;
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
if (Core.getVersion() == 15) return;
|
if (Core.getVersion() == 12 && e.getEntityType() == EntityType.PRIMED_TNT) {
|
||||||
if (e.getEntityType() == EntityType.PRIMED_TNT) {
|
|
||||||
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), () -> {
|
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), () -> {
|
||||||
e.getLocation().getBlock().setType(Material.TNT, false);
|
e.getLocation().getBlock().setType(Material.TNT, false);
|
||||||
}, 1L);
|
}, 1L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockCanBuild(BlockCanBuildEvent e) {
|
public void onBlockCanBuild(BlockCanBuildEvent e) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren