-Version is 1.20.30 - Not available to select- ** It is now available so have updated this.
isOp() from the Player class is always returning false, even if the player is operator, except if setOp(true) is called first.
This defeats the purpose of having an isOp() method if you have to manually check player IDs just to see if they should have setOp() called.
Linked issues
Attachments
Comments 15
Really? Marking it resolved without even looking into it. I'm not sure how much clearer I could have been.
Steps to Reproduce:
1. Make a Bedrock Dedicated Server
2. Use the Minecraft Script API
3. Call the function Player.isOp() in the context of a Player who is operator e.g. using the PlayerBreakBlockAfterEvent
4. Observe the result with console.log()
Observed Results:
The function always returns a value of false even when the player is operator
Expected Results:
The function returns true when the player is operator
I haven't tested on any other platforms so I don't know. Doesn't seem like something that would be platform specific.
I'm seeing exactly the same issue as described. My mod is designed such that it adds additional restrictions to players which aren't operators. This works as expected in a single player game (as I change my account type back and forth between Operator and Member) but in the bedrock server game it always returns false, for all players.
According to this https://minecraft.wiki/w/Server.properties the op-permission-level property is for Java Edition. This issue is for the Bedrock Server.
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response
Can you please describe your issue in more detail?
To make your bug report as effective as possible, please try and include the following steps to reproduce the problem:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
Quick Links:
📓 Bug Tracker Guidelines – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 BDS Wiki – 📖 FAQs