Protection Modules

Description

A protection module can be used to do many things, depends on the corresponding plugin.

What can it do:

  1. Get a protection range by player/location

  2. Check a player/location is in any protection range

  3. Get all protection ranges by a player (feature not completed)

  4. Get/Set global flags

Get protection module

There're 4 ways of getting the protection module:

No.1:

IProtectionModule module = ProtectorAPI.findModule(location);

No.2 (since v1.0.2):

IProtectionModule module = ProtectorAPI.getModuleByPluginName(pluginName);

No.3 (since v1.0.3, may not you want):

IProtectionModule module = ProtectorAPI.getFirstAvailableModule();

No.4 (since v1.0.5):

Get a protection range

See Protection Range Info for details.

Check a player/location is in any protection range

Get all protection ranges by a player

Get/Set global flags

NOTE: Some plugins don't support global flags, so when executing the method, it will throw an UnsupportedOperationException.

Last updated