1
\$\begingroup\$

In Minecraft Forge, I would like to know if there is any way to find out if a player currently has vanilla "OP" / "Operator" status. I can't find a method that does this on the EntityPlayer Class.

I'd like something like:

EntityPlayer player = (EntityPlayer)sender; if (player.getOpStatus) { [do some stuff] } 
\$\endgroup\$
3
  • 2
    \$\begingroup\$ This kind of question is off-topic and not suitable for this site. \$\endgroup\$ Commented Jul 10, 2015 at 11:31
  • \$\begingroup\$ I'm voting to close this question as off-topic because it is asking for MinecraftForge documentation \$\endgroup\$ Commented Jul 10, 2015 at 14:10
  • 1
    \$\begingroup\$ @Rouze Mod questions are allowed. I removed the documentation question, since that is off topic. \$\endgroup\$ Commented Jul 11, 2015 at 6:46

1 Answer 1

2
\$\begingroup\$

Using EntityPlayerMP#canCommandSenderUseCommand(int permLevel, String commandName) might be a way to find out if a player is an operator.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.