方块保护模块
描述
检查玩家是否可以 破坏/放置/交互 该位置的方块
Location location = ...;
Player player = ...;
IBlockProtectionModule module = ProtectorAPI.findBlockModule(location);
if (module == null) {
return;
}
if (!module.isProtected(player, location)) {
return;
}
boolean break = module.allowBreak(player, location);
boolean place = module.allowPlace(player, location);
boolean interact = module.allowInteract(player, location);注册标志
最后更新于