Remove Redstone ore activation while freezed
Dieser Commit ist enthalten in:
Ursprung
ddcbec834e
Commit
2d068abe32
@ -25,6 +25,7 @@ import de.steamwar.bausystem.world.Region;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.*;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
|
||||
@ -78,6 +79,15 @@ public class CommandFreeze extends RegionToggleCommand {
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEntityChangeBlock(EntityChangeBlockEvent e) {
|
||||
Region.getRegion(e.getBlock().getLocation(), region -> {
|
||||
if (region.isFreeze()) e.setCancelled(true);
|
||||
}, () -> {
|
||||
if (Region.NoRegion.freeze) e.setCancelled(true);
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPhysicsEvent(BlockPhysicsEvent e){
|
||||
Region.getRegion(e.getBlock().getLocation(), region -> {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren