TechnicJelle / BlueMapOfflinePlayerMarkers

Minecraft Paper plugin and BlueMap addon that adds markers where players have logged off
Mozilla Public License 2.0
14 stars 8 forks source link

Skript to load multiple servers worth of worlds #16

Closed elsing closed 2 years ago

elsing commented 2 years ago

So recently I have been wanting to create a way of archiving my old servers and for people to be able to view them. I decided running a Minecraft server for each world or one for all the worlds would be more hassle than needed. Therefore, I chose to use BlueMaps to view them online.

However, I had no idea where people had built, so I thought using their last known position (NBT data) would be a good way of finding some bases. Then I found this plugin (OfflinePlayerMarkers), but it does not read the playerdata. @Mark-225 did add this functionaility, which did work - but only for the main server world and I needed it to work on multiple worlds :)

And so, this Skript was made, in order to read the playerdata of old worlds and add the last logout positions of players to BlueMaps. This is a potential way of doing it and was thrown together fairly quick but works quite well for me.

You would want to use this when you have a number of old servers and worlds you want to load into BlueMaps and have no idea where people are in said worlds.

This is a concept for loading from playerdata in a folder named "ROOTDIR(e.g server.properties)/archiveservers/{servername}/{"overworld" or "nether" or "end"} the name of the world folders are set for now (apart from /addworld - this can be custom)

This should work on all all worlds, old and new - as long as it has the "playerdata" folder

Server = all the worlds in a server... e.g. overworld, nether and the end When adding a server (/addserver) it will by default add the 3 main dimensions.

World = Single dimension of a server... e.g. the nether When adding a world (/addworld) it will add the dimension you specify and the server if it does not exist

There are 6 commands...

/addserver {string} - For automated input of the 3 default dimensions /addserver {servername}

/addworld {string} {string} - For automated input of SINGLE dimension /addworld {servername} {dimensionname}

/removeserver {string} - For automated removal of servers /removeserver {servername}

/removeworld {string} {string} - Remove single dimensions from a world /removeworld {servername} {worldname}

/offlinemarkers {string} {string}:

/addmarker {string} {string} {string} {string} {string} {string} - Ignore this, this is to get around a bug in BlueMaps where Skript cannot run the command but Skript telling Skript to run the command works xD

Let me know if you have any questions or encounter any problems!

TechnicJelle commented 1 year ago

@elsing This doesn't work anymore with BlueMap v3, so I'm removing the file from the repo... You're welcome to PR a new version :)