Simplify CommandProtect
Dieser Commit ist enthalten in:
Ursprung
6453ec6616
Commit
a6e32e08cf
@ -114,14 +114,11 @@ public class CommandProtect extends SWCommand implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onExplode(EntityExplodeEvent event) {
|
||||
Region region = Region.getRegion(event.getLocation());
|
||||
if (!region.isProtect() && !region.hasProtection()) {
|
||||
return;
|
||||
}
|
||||
event.blockList().removeIf(block -> {
|
||||
Region region = Region.getRegion(block.getLocation());
|
||||
if (!region.isProtect()) {
|
||||
return false;
|
||||
}
|
||||
if (!region.hasProtection()) {
|
||||
return false;
|
||||
}
|
||||
return block.getY() < region.getProtectYLevel();
|
||||
});
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren