▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/ProtectorAPI
ProtectorAPI

ProtectorAPI

An API aims to provide a standard protection API.

153
0

ProtectorAPI

An API try to provide a standard protection API.

What can it do?

  1. Get the protection range that protected by protection plugin
  2. Check player can place/break/interact the block
  3. Register flags easily
  4. You don't need to worry about multiple protection plugins in the server, ProtectorAPI handles it perfectly.

Supported Plugins

  1. Residence
  2. Dominion
  3. HuskClaims (since v1.0.3)
  4. IridiumSkyblock (since v2.0.0)
  5. PlotSquared
  6. WorldGuard
  7. RedProtect
  8. BentoBox
  9. BlockLocker
  10. Bolt
  11. ChestProtection
  12. ChestShop (since v1.0.2)
  13. ExcellentClaims (since v1.1.0)
  14. FactionsUUID (since v1.0.3)
  15. FunnyGuilds (since v1.0.3)
  16. GriefPrevention (since v1.0.6)
  17. HuskTowns (since v1.0.6)
  18. Lands
  19. LockettePro (since v1.0.1)
  20. LWC (LWCX)
  21. NoBuildPlus (since v1.0.7)
  22. QuickShop-Reremake
  23. QuickShop-Hikari
  24. ShopChest
  25. Towny

Usage

See https://lijinhong11.gitbook.io/protectorapi/start/readme

Develop

See https://lijinhong11.gitbook.io/protectorapi/develop/setup
Javadocs: https://javadoc.io/doc/io.github.lijinhong11/protectorapi-api/latest

Develop Examples

Check whether a player can place

Player player = ...;

boolean allow = ProtectorAPI.allowPlace(player);

If you need to check wehether 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

Player player = ...;

boolean allow = ProtectorAPI.allowBreak(player);

If you need to check 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 "redstone" flag to check instead.

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);

Совместимость

Minecraft: Java Edition

1.21.x1.20.x1.19.x1.18.x1.17.x1.16.x1.15.x1.14.x1.13.x1.12.x1.11.x1.10.x1.9.x1.8.x1.7.x

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:GPL-3.0-only
Опубликован:7 месяцев назад
Обновлён:5 дней назад
Главная