Open codehz opened 6 years ago
I don't know why cheats are not enabled by default, but well, I'll fix it in a bit. As for the rest option, I added them. Also, MOTD can finally now be set so the server actually shows up in the server list:
can we join that that sever
@MCMrARM Still cannot use the command in game
Make sure you are op/have the 👑 in game
@guppy42 Not working...
But I can adjust the game setting in client to enable the cheats now, and then I can use command!(op)
The OP permission settings do not seem to be persistent, If I leave the game and join again, I must re-enter op CodeHz
in terminal or I will lose the OP permission...
Cheats are enabled only for new worlds.
As for the op list, yes, currently I do not load the op list or whitelist.
@MCMrARM I think they(op list and white list) are not core feature for the launcher, so they can be mods...
If they are implemented as mods, they will be good examples for mod developing and have more scalability.
I think op list and white list can be implemented by hooking the function that handle players to join the game.(_ZNK9minecraft3api15PlayerInterface23handlePlayerJoinedEventER6Player ?)
I am currently doing some tests about modding the dedicated server. If you want to see an example, I uploaded a simple mod to show a welcome message on joining: https://github.com/julianwi/mcpelauncher-linux/commit/d62f5f98f5564a7b7557ae0abeec4446fa2f995a.
meh this is not the way you should be doing the mods :P but the other way is kind of broken currently, I guess I'll see soon what can be done
I wonder, does MCPE not store the permissions set in the pause menu?
@MCMrARM I'd think so, the permission is not stored, but the game mode and inventory have been stored(tested in real Android device's server). the default permission can be chosen in menu..and I believe that the white list have also been "replaced" by Xbox Account's visibility policy:)
@MCMrARM It seems there is PermissionsHandler::getPlayerPermissions()
function to get the permission information...But I don't know why it does not working, or it is not for Operator Permission level?
Fixed the operator list not persisting
E.g generator (tested, and 0 = Old World Type 1 = Infinite World(Normal) 2= Super Flat) cheat mode (I've no idea for that, but this option is very important) max view distance (ditto, but this options may be not configurable...)
Although some options can now be enabled by uploading level files :)