Refactor EnginePermBuild to more suitable structure.
This commit is contained in:
@@ -52,7 +52,7 @@ public class FactionsLwcModule extends JavaModule
|
||||
if ( ! MConf.get().lwcMustHaveBuildRightsToCreate) return;
|
||||
|
||||
// ... and the player don't have build rights here ...
|
||||
// NOTE: We verbosely check the build rights so that a proper info message is sent
|
||||
// NOTE: We verbosely check the build rights so that a proper info message is sent
|
||||
if (EnginePermBuild.canPlayerBuildAt(event.getPlayer(), PS.valueOf(event.getBlock()), true)) return;
|
||||
|
||||
// ... then cancel the event.
|
||||
|
@@ -53,11 +53,8 @@ public class EngineSpigot extends Engine
|
||||
// Only care for armor stands.
|
||||
if (entity.getType() != EntityType.ARMOR_STAND) return;
|
||||
|
||||
// If we can't use ...
|
||||
if (EnginePermBuild.canPlayerUseEntity(player, entity, verboose)) return;
|
||||
|
||||
// ... block use.
|
||||
event.setCancelled(true);
|
||||
// If we can't use, block it
|
||||
EnginePermBuild.useEntity(player, entity, verboose, event);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user