Add WorldManager and map-system support

Introduce WorldManager to select and unpack a random map ZIP into the server root before startup. The plugin now calls WorldManager.prepareRandomWorld() in onLoad (before onEnable) and reloads config there. Added map-system config options (enabled, zip-folder, target-world-name, maps) with example entries. WorldManager deletes existing world folders, extracts the chosen ZIP (with zip-slip protection) and logs progress.
This commit is contained in:
TDSTOS
2026-03-28 02:50:51 +01:00
parent 8e96a07a65
commit 84be2a30bc
3 changed files with 112 additions and 2 deletions

View File

@@ -25,6 +25,18 @@ recraftNerf:
beforeFeast: true
maxAmount: 64
map-system:
enabled: false
# Der Ordner im Plugin-Verzeichnis, in welchem die ZIPs liegen
zip-folder: "maps"
# Name der Zielwelt
target-world-name: "world"
# Liste der verfügbaren Maps
maps:
- "hg_map_1.zip"
- "hg_map_2.zip"
- "hg_map_3.zip"
discord:
enabled: false
webhook-url: "DEINE_WEBHOOK_URL_HIER"