Reputation: 23
I'm creating minecraft spigot plugin, how can I test if player is op?
For example in
if (player.hasPermission("example.permission"){ //do something }
I can use .hasPermission. Is there something like that for checking op? Does op have all permissions?
Upvotes: 0
Views: 388
Reputation: 46
Use this query to check if the player is OP.
if (player.isOp()) {
//Do the things you wanna do
}
Upvotes: 3