pineapple500 pineapple500 - 2 months ago 18
Java Question

Minecraft - creating spigot plugin - testing for op

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?


Use this query to check if the player is OP.

if (player.isOp()) {
//Do the things you wanna do