TeleportSuite

50.8k Downloads

World teleport permission.

Lunaphied opened this issue ยท 0 comments

commented

Instead of running a task and updating that permission node you can do two permission tests one for the * node and another for the world node such as this

boolean isAllowed = false;

if (player.isPermissionSet("teleport.world." + world.getName())) {
  isAllowed = player.hasPermission("teleport.world." + world.getName());
else if (player.isPermissionSet("teleport.world.*")) {
  isAllowed = player.hasPermission("teleport.world.*");
}