Compact Machines

Compact Machines

68M Downloads

Suggestion: OP private bypass

shinyafro opened this issue ยท 5 comments

commented

Suggestion to allow operators to access private machines.

commented

Should already be possible via the command:
/compactmachines3 machines view

commented

You cant actually enter, but you can view. Its nice to be able to enter, is all. I did manage to import this into my ide and just add a check to the isAllowedToEnter() Method. Seemed to work just fine when i ran the server.
//Allows OPs to enter the machine if it is whitelisted. if ( FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getOppedPlayers().getEntry( player.getGameProfile() ) != null ) { return true; }
But i'm a scrub when it comes to coding tbh so i have no idea what to do past there. Fortunately it works serverside so i can just drop that in the server jar.

Oh and yeah the teleport buttons seem to disconnect me from the server when i use them.

commented

This is fixed as of SizableShrimp@394cef4 using the exact same approach listed above. However, I haven't yet investigated if this is ever called client-side, which may not work if they are opped and this is called client-side (e.g. in a menu).

commented

I just confirmed by looking at the source code that it is not possible for this to be called on the client. This solution confirmed works.

commented

Needs final testing after the merge of #439. Will close after this is confirmed operational.