
ProtectorAPI
An API aims to provide a standard protection API.
- Загрузки
- 382
- Подписчики
- 0
- Обновлён
- 16 мая 2026 г.
- Лицензия
- GPL-3.0-only
Опубликован 8 августа 2025 г.
ProtectorAPI
An API try to provide a standard protection API.
What can it do?
- Get the protection range that protected by protection plugin
- Check player can place/break/interact the block
- Register flags easily
- You don't need to worry about multiple protection plugins in the server, ProtectorAPI handles it perfectly.
Supported Plugins
- Residence
- Dominion
- HuskClaims (since v1.0.3)
- IridiumSkyblock (since v2.0.0)
- PlotSquared
- WorldGuard
- RedProtect
- BentoBox
- GriefDefender (since v2.2.1)
- BlockLocker
- Bolt
- ChestProtection
- ChestShop (since v1.0.2)
- ExcellentClaims (since v1.1.0)
- FactionsUUID (since v1.0.3)
- FunnyGuilds (since v1.0.3)
- GriefPrevention (since v1.0.6)
- HuskTowns (since v1.0.6)
- Lands
- LockettePro (since v1.0.1)
- LWC (LWCX)
- NoBuildPlus (since v1.0.7)
- QuickShop-Reremake
- QuickShop-Hikari
- ShopChest
- 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);
Ченджлог
2.2.1Релиз26.1, 26.1.1, 26.1.2 · 16 мая 2026 г.
Support GriefDefender
Add four common flags
2.2.0Релиз26.1, 26.1.1, 26.1.2 · 11 апреля 2026 г.
Event handlers implementation
Allows to get world by protection range
Move IBlockProtectionModule
2.0.2Релиз1.21.9, 1.21.10, 1.21.11 · 14 марта 2026 г.
Rename IProtectionRangeInfo to IProtectionRange
2.0.1Релиз1.21.9, 1.21.10, 1.21.11 · 7 марта 2026 г.
Support low versions
2.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 25 февраля 2026 г.
- Breaking changes:
- IFlagState -> FlagState
- FakeEventMaker deleted
- and more...
- Support IridiumSkyblock
- Update debug command
1.1.1Релиз1.21.9, 1.21.10, 1.21.11 · 12 февраля 2026 г.
Add debug command
Fix plugin.yml
1.1.0Релиз1.21.9, 1.21.10, 1.21.11 · 24 января 2026 г.
Support ExcellentClaims
1.0.10Релиз1.21.9, 1.21.10, 1.21.11 · 1 января 2026 г.
- Some edits about updater
- FunnyGuilds 's block protection module can only compatible with 4.13.1+ due to the API change
Комментарии
Загружаем…