Jump to content

Recommended Posts

Posted (edited)

Is there a reliable way to get the op level of a specific player on a server?

We currently use: 

FMLCommonHandler.instance().getMinecraftServerInstance().canUseCommand(requiredOpLevel, cmdName)

 

where requiredOpLevel is the required Op level for a certain action. Seems to work well in smp and ssp but doesn't work at all on sponge servers or similar.

Is there a better way?

Edited by Raycoms
Posted

The problem with this is that most permission plugins seem to use permission node which give the player the ability to use certain commands.

This seems to give them op in this sense and doesn't work for us I think.

Posted

We have custom commands players can call.
One of them, for example, is "delete colony". 
Ops can delete everyone's colonies, players only their owns.
In singlePlayer or lan we check if they have op the normal way and if not we restrict the usage. 
But on a server with permission nodes. We have to allow the whole command usage, and, the player gains op level for that execution because of that.

Posted

The problem is that the permission mod only allows binary decisions. Allow a command completely without restrictions or don't allow a command.

But since we want to check inside the command the op level of the player, and the permission plugin gives him completely op for that command, this doesn't work.
That's why we want a general way to decide it.

Thought about checking if the player is allowed to execute a certain sort of commands like gamemode, ban or kick, but that isn't that reliable as well.

Posted

-.-

Like I said PlayerList::canSendCommands checks if the player is able to send a certain command.
Which, even on a server and not op, he might be due to a permission mod.

 

Therefore, this doesn't work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.