Player.hasPermission

Indicates whether the player has the given permission.

class Player
bool
hasPermission
(
string permission
)

Examples

if(!player.hasPermission("minecraft.teleport")) {
   player.grantPermission("minecraft.*");
   assert(player.hasPermission("minecraft.teleport"));
}

Meta