MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
311 stars 44 forks source link

[server] More configuration options #286

Open codehz opened 6 years ago

codehz commented 6 years ago

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 :)

MCMrARM commented 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: screenshot from 2018-01-13 13-24-20

Artistic-Waffle commented 6 years ago

can we join that that sever

codehz commented 6 years ago

@MCMrARM Still cannot use the command in game image

guppy42 commented 6 years ago

Make sure you are op/have the 👑 in game

codehz commented 6 years ago

@guppy42 Not working... image 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... image

MCMrARM commented 6 years ago

Cheats are enabled only for new worlds.

MCMrARM commented 6 years ago

As for the op list, yes, currently I do not load the op list or whitelist.

codehz commented 6 years ago

@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 ?)

julianwi commented 6 years ago

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.

MCMrARM commented 6 years ago

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

MCMrARM commented 6 years ago

I wonder, does MCPE not store the permissions set in the pause menu?

codehz commented 6 years ago

@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:)

codehz commented 6 years ago

@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?

MCMrARM commented 6 years ago

Fixed the operator list not persisting