Minecraft Plugin World löschen?
Hey, ich bin gerade dabei ein Spielmodus zu entwickeln in Spigot für die 1.20.1. Dafür wird aus einem Ordner (./server/plugins/meinplugin/Welten) eine Welt zufällig geladen. Diese soll aber nun nach der Runde zurück gesetzt werden. Ich habe dafür die Welt gelöscht und eine neue reingeladen. Dann ein restart per Zusatz Skript ausgeführt. Das Problem ist das die world nie entladen werden kann. Dies ging aber vor dem Automatischen Server Restart noch (da habe ich per Hand “world” gelöscht und den Server selbst gerestartet).
Nun meine Frage: Wie kann ich den Server neustarten sodass world entladen wird und eine neue Spielwelt erfolgreich (aus dem Ordner) geladen wird?
Ps: Ich habe auch schon probiert ob das ganze während der Startup Phase geht. Ohne Erfolg. Das ganze ist später mal für ein Bungeecord System gedacht.
Hey,
I’m not quite sure, but you can delete a world in the onLoad Event. I’ve had it so solved in one of my plugins.
I write before I restart the server I add a reset: true to the Config and then the world is deleted in the onLoad Event. The server does not charge worlds with other names unless it is requested by a plugin. You can also restart and not reset if you do not enter a reset: true in the Config. However, this must be in the plugin.yml:
Thus, the plugin is loaded before the worlds and you can delete/exchange the world.
I hope that helps you somehow…
LG
Jonas