简体   繁体   English

Minecraft-创建spigot插件-测试OP

[英]Minecraft - creating spigot plugin - testing for op

I'm creating minecraft spigot plugin, how can I test if player is op? 我正在创建Minecraft插头,如何测试播放器是否为op?

For example in 例如在

if (player.hasPermission("example.permission"){ //do something }

I can use .hasPermission. 我可以使用.hasPermission。 Is there something like that for checking op? 是否有类似的检查操作的东西? Does op have all permissions? op是否拥有所有权限?

Use this query to check if the player is OP. 使用此查询来检查播放器是否为OP。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM