Skip to main content

Neue Seite

Migration from v1-legacy to v2

GWorld v2 features intelligent migration systems that make the transition from older versions or the change between storage media (files to database) as easy as possible.

Are you looking for a way to switch from YAML to MySQL? Then please follow this link: Switch from YAML (File) to MySQL (DB)


Migration from GWorld v1 to v2

When you upgrade from the first version of GWorld to v2, the plugin will automatically detect this during the first start.

How it works

  • Detection: The plugin looks for an existing worlds.yml where...
    • the ConfigVersion field is missing
    • the LoadWorlds list exists
    • the Worlds list exists
  • Automatic Backup: Before changes are made to the datasets, GWorld renames the old file to worlds_legacy_backup.yml.
  • Data Conversion: The LegacyMigrator reads all old world definitions and transfers them into the new, structured v2 format. Missing new fields are filled with default values.
  • Seed Repair: Since seeds were not saved in v1, GWorld v2 automatically detects missing seeds when the world is first loaded, reads the correct seed from the world files, and corrects the entry.

Note: During the migration, the console will inform you about the progress. Once the worlds.yml file contains a ConfigVersion: 1, the process is complete. This will also be output in the console.

After a successful migration, GWorld v2 starts normally and all worlds are loaded.

Security Measures & Prerequisites

To ensure a smooth migration, please note the following points:

Prerequisites (see Introduction)

  • Java Version: GWorld v2 strictly requires at least Java 21, as modern language features are used.

Checklist

  • Create a manual backup of your entire plugin folder before upgrading.
  • After the migration, check with the command /gworlds whether all worlds are listed correctly.
  • Check the server console for error messages during the first start.

Example worlds.yml Configurations

worlds.yml (v1)

worlds.yml (v2.0.0)

#Copyright (c) Gilljan 2020-2022. All rights reserved.
#Plugin written by Gilljan
LoadWorlds:
  - world
  - world_nether
  - world_the_end


Worlds:
  world:
    generator: 'null'
    type: normal
    timeCycle: true
    time: 6000
    weatherCycle: true
    weather: sun
    pvp: true
    mobs: true
    animals: true
    forcedGamemode: false
    defaultGamemode: SURVIVAL
    difficulty: NORMAL
    randomTickSpeed: 3
    announceAdvancements: true
  world_nether:
    generator: 'null'
    type: nether
    timeCycle: true
    time: 6000
    weatherCycle: true
    weather: sun
    pvp: true
    mobs: true
    animals: true
    forcedGamemode: false
    defaultGamemode: SURVIVAL
    difficulty: NORMAL
    randomTickSpeed: 3
    announceAdvancements: true
  world_the_end:
    generator: 'null'
    type: end
    timeCycle: true
    time: 6000
    weatherCycle: true
    weather: sun
    pvp: true
    mobs: true
    animals: true
    forcedGamemode: false
    defaultGamemode: SURVIVAL
    difficulty: NORMAL
    randomTickSpeed: 3
    announceAdvancements: true
ConfigVersion: 1

Worlds:
  world:
    Environment: NORMAL
    Type: NORMAL
    Seed: 541091381232416907
    AllowPvP: true
    KeepSpawnInMemory: true
    AnimalSpawning: true
    DisabledAnimals:
    - cow
    MonsterSpawning: false
    DisabledMonsters:
    - spider
    WeatherCycle: false
    WeatherType: CLEAR
    TimeCycle: false
    Time: 6000
    DefaultGamemode: false
    GameMode: ADVENTURE
    Difficulty: HARD
    LoadOnStartup: true
    RandomTickSpeed: 3
    AnnounceAdvancements: true
  world_nether:
    Environment: NETHER
    Type: NORMAL
    Seed: 541091381232416907
    AllowPvP: true
    KeepSpawnInMemory: true
    AnimalSpawning: true
    DisabledAnimals: []
    MonsterSpawning: true
    DisabledMonsters: []
    WeatherCycle: true
    WeatherType: CLEAR
    TimeCycle: true
    Time: 0
    DefaultGamemode: false
    GameMode: SURVIVAL
    Difficulty: NORMAL
    LoadOnStartup: false
    RandomTickSpeed: 3
    AnnounceAdvancements: true
  world_the_end:
    Environment: THE_END
    Type: NORMAL
    Seed: 541091381232416907
    AllowPvP: true
    KeepSpawnInMemory: true
    AnimalSpawning: true
    DisabledAnimals: []
    MonsterSpawning: true
    DisabledMonsters: []
    WeatherCycle: true
    WeatherType: CLEAR
    TimeCycle: true
    Time: 0
    DefaultGamemode: false
    GameMode: SURVIVAL
    Difficulty: NORMAL
    LoadOnStartup: false
    RandomTickSpeed: 3
    AnnounceAdvancements: true

This documentation refers to GWorld version 2.0.0.