Merge pull request 'Fix Freeze in 1.12' (#182) from FixFreeze into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
0cab286774
@ -54,14 +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.getEntityType() == EntityType.PRIMED_TNT) {
|
||||
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), () -> {
|
||||
e.getLocation().getBlock().setType(Material.TNT, false);
|
||||
}, 1L);
|
||||
}
|
||||
if (!Region.getRegion(e.getLocation()).isFreeze()) return;
|
||||
e.setCancelled(true);
|
||||
if (Core.getVersion() == 12 && e.getEntityType() == EntityType.PRIMED_TNT) {
|
||||
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), () -> {
|
||||
e.getLocation().getBlock().setType(Material.TNT, false);
|
||||
}, 1L);
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren