mojira.dev
MCPE-169433

The isOp method of the Player class returns true no matter what

When creating a javascript script with the Beta API, the bool function "isOp"  will always return true whether or not the player it is being run on is an operator.

Steps to reproduce:

  1. Create a new behavior pack with a js scripting module

  2. In that module, create a function to output whether or not the player has Op

  3. deop and op yourself in game and see

 

Attachments

Comments 3

I have not worked with the Beta API, but i have worked with javascript before, so if i am wrong please forgive me but
In your code on line 4 console.warn("Player is op:", event.sender.isOp)
You are not running the method, but you are getting the value, this means either the example code or your Title and description are wrong

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Could you please attach an example behavior pack that uses the attached JS file and showcases the issue?

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

IolaireEagle

(Unassigned)

Unconfirmed

Windows

Windows 10

1.19.73

Retrieved