Simple usage

Check whether a player can place

Only check a player can place

Player player = ...;

boolean allow = ProtectorAPI.allowPlace(player);

If you need to whether a player can place a block at a location (safer than previous method):

Player player = ...;
Block block = ...;

boolean allow = ProtectorAPI.allowPlace(player, block);

Check whether a player can break

Only check a player can break

Player player = ...;

boolean allow = ProtectorAPI.allowBreak(player);

If you need to whether a player can break a block at a location (safer than previous method):

Player player = ...;
Block block = ...;

boolean allow = ProtectorAPI.allowBreak(player, block);

Check whether a player can interact

NOTE: RedProtect didn't have a more general interaction flag, so we uses flag to check instead.

Only check a player can interact

Player player = ...;

boolean allow = ProtectorAPI.allowInteract(player);

If you need to whether a player can interact block at a location (safer than previous method):

Player player = ...;
Block block = ...;

boolean allow = ProtectorAPI.allowInteract(player, block);

Check a event was fired by Protection Plugin is fake

Event event = ...;
boolean fake = ProtectorAPI.isEventFake(event);

Last updated