Hi I need that someone tell me how to rename any world folder name because I really don't know xD Something like this: PHP: case 'rename':$folder = $this->getServer()->getDataPath() . "worlds/" . $args[0]; //maybe?//and rename it likerename($folder, $args[1]); I don't know how to do it
Hmm... I'm not sure, but I don't think the folder is the level name, I think "level.dat" is what saves the level name.
Yes I know but is there any way to rename the folder name but nope inside folder files? like /worlds/lobby change it to /worlds/test
Try this: PHP: $worlds = $this->getServer()->getDataPath() . 'worlds/';$oldWorldName = 'old';$newWorldName = 'new';rename($worlds . $oldWorldName, $worlds . $newWorldName);
Some functions use the world name in level.dat and some use the folder name (don't know which one uses which one of those <-- dat English xD) This could possibly help for changing the level.dat values: https://github.com/Muirfield/ManyWorlds/blob/master/src/aliuly/manyworlds/MwLvDat.php
That's something completely off-topic. The poster wants to know how to change the name of an existing world via a plugin. Just the folder, or the value in level.dat, too?
okay i just had this same problem today i wanted to change a world name or level whatever i renamed the world folder Server-lobby i went into server properties and changed level to Server.properties and opened the level.dat with a text editer and changed the name to Server-Lobby and now when i shut my server down it says unloaded level " " as if i didn't name it :d its the small things that are a pain in the butt