ProtectorAPI 图标

ProtectorAPI

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 2.3.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/protectorapi
资源信息

Minecraft 版本: 26.1 26.1.1 26.1.2 26.2

平台: bukkit folia paper purpur spigot

标签: library utility

资源介绍

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. GriefDefender (since v2.2.1)
  10. BlockLocker
  11. Bolt
  12. ChestProtection
  13. ChestShop (since v1.0.2)
  14. ExcellentClaims (since v1.1.0)
  15. FactionsUUID (since v1.0.3)
  16. FunnyGuilds (since v1.0.3)
  17. GriefPrevention (since v1.0.6)
  18. HuskTowns (since v1.0.6)
  19. Lands
  20. LockettePro (since v1.0.1)
  21. LWC (LWCX)
  22. NoBuildPlus (since v1.0.7)
  23. QuickShop-Reremake
  24. QuickShop-Hikari
  25. ShopChest
  26. 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);
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Favorite Language

价格:0 墨喵币
下载量:0

查看详情
oiiai cat

价格:0 墨喵币
下载量:0

查看详情
Lower Shield

价格:0 墨喵币
下载量:0

查看详情
Untitled Duck Mod x Pets Mod

价格:0 墨喵币
下载量:0

查看详情