Hi Red,
My plugin protects players doors from being opened and closed via the PlayerObjectInteractionEvent.
However, this does mean that all doors, be them locked or unlocked are unoperable by players who do not "own" the land.
I would like to make this so that players can open unlocked doors to explore builds.
IWith that in mind I've noticed that the event.getObject().getInfo() will return a 0 if the door is unlocked or a 1 if it is locked. (This return type is a Long - not sure why?)
Anyway, the main stumbling block is that this method (PlayerObjectInteractionEvent) isn't called if the player holds down the action key to access the objects radial menu - so anyone can lock or unlock a door.
Is there a method that is called when these kinds of radial menus are opened? I can't seem to find one? Maybe one does not exist!
Maybe we need a new method to check if a door/chest is locked or not? One that is invoked *before* the radial menu pops up.
(In addition I have noticed a small bug you may want to fix. When a door is flipped to enable "double doors", one of the doors radial menu is the wrong way round ("open" and "close" are the wrong way round.) See below: