[Scripting] isOp() returns false when players are operator
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.
Environment
Ubuntu Server
Linked Issues
Created Issue:
[Scripting] isOp() returns false when players are operator
Version is 1.20.30 - Not available to select
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.
Environment
Ubuntu Server
Version is 1.20.30 - Not available to select
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.
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.
is duplicated by
Thank you for your report!
We're resolving and linking this ticket forward as a duplicate of BDS-18725, as that ticket contains more detailed information and/or has already been triaged by Mojang.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
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
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
Any progress?
Hi
Does it only occur on Linux?
This ticket will automatically reopen when you reply.
I haven't tested on any other platforms so I don't know. Doesn't seem like something that would be platform specific.
Hi
I need more detailed instructions how to reproduce this issue. If possible with video as well.
This issue will automatically reopen when you reply.
Ok. Can you stop marking it as resolved then? It's not resolved.
Hi
It is resolved as awaiting response. It automatically reopens when you reply. It is still tracked and open, but we need more detailed information how to reproduce this issue.
Firstly, I am aware of how JIRA works. I am a .NET Software Engineer and use the same platform. That's very poor workflow management if you're marking them as resolved instead of one more suitable.
FYI this is a regression. It was working fine in 1.20.15 but not in 1.20.30.
Can you tell me what you have tried so far so I can make corrections that will allow you to reproduce the issue?
I have confirmed that the issue is present on Windows also.
Steps to Reproduce:
Here is the code that checks the operator status using the Minecraft Script API specifically, this part: minecraft/server.Player Class
Observed Results:
The player is not being recognized as having operator status even though they do.
Expected Results:
When the player with operator status spawns, the message should say "Player is op".
Additonal Info:
Link to Video: MinecraftScriptingBug
Video Also Attached
Any progress on this?
isOp() working fine in local world for me. But in realms, it's not.
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.
you have to set op-permission-level in server.properties
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.