if (existingProtection != null) {
event.setProtected(true);
return;
}
LWCProtectionRegisterEvent protectionEvent = new LWCProtectionRegisterEvent(player, block);
lwc.getModuleLoader().dispatchEvent(protectionEvent);
if (protectionEvent.isCancelled()) {
return;
}
Protection protection = lwc.getPhysicalDatabase().registerProtection(block.getTypeId(), Protection.Type.PRIVATE, worldName, player.getName(), "", x, y, z);