如题,玩家可以在别人的地皮上使用tree 无视p2保护
不要说关掉tree权限
不要说关掉tree权限
本帖最后由 2000000 于 2022-10-29 20:41 编辑
请在地皮世界对此指令进行限制,具体参考以下插件。
https://www.spigotmc.org/resources/per-world-command-block.17523/
或您应该可以使用地皮插件的开发者API来检查一个玩家是否在地皮中,或者是否在地皮世界中,若为真则对部分指令进行屏蔽 (PlayerCommandPreprocessEvent)
或使用开发者API来检查玩家是否在别人的地皮当中来达到您想要的效果。
请在地皮世界对此指令进行限制,具体参考以下插件。
https://www.spigotmc.org/resources/per-world-command-block.17523/
或您应该可以使用地皮插件的开发者API来检查一个玩家是否在地皮中,或者是否在地皮世界中,若为真则对部分指令进行屏蔽 (PlayerCommandPreprocessEvent)
@EventHandler (priority = EventPriority.HIGHEST)
public void playerDoCommands(PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();
String cmd = event.getMessage().toLowerCase(Locale.ROOT);
if (!player.getWorld().getName().toLowerCase(Locale.ROOT).equals("dp")) return;
if (cmd.contains("/tree")) {
event.setCancelled(true);
player.sendMessage(CC.translate("u cant use this command in this world."));
}
}
或使用开发者API来检查玩家是否在别人的地皮当中来达到您想要的效果。
FAWE命令默认只能在OP状态下使用。
请检查你的权限分配是否有问题
请检查你的权限分配是否有问题