Skip to content

Updating The Plugin

Ryandw11 edited this page Mar 20, 2023 · 12 revisions

Updating Custom Structures is an easy process. All you need to do is download the new version and replace the old jar with the new jar!
Sometimes, major configuration updates occur that requires the plugin to go through and update your configuration formats. The plugin will attempt to do that for you! To see guides on these major updates look below. Please check the compatibility updates to see what versions you need to update.

Compatibility Table

configversion Numerical Version Range
9 1.9.0+ (current)
8 1.8.1 - 1.8.2
7 1.6.0 - 1.8.0
6 1.5.6 - 1.5.8
5 1.5-1.5.5
4 1.4.2-1.5
< 3 < 1.4.1 (Must Reinstall Plugin)

If you have an outdated version of the plugin you can look above and see what version require an update of the configuration files. Your configversion can also be found in the config.yml of the plugin. (Never edit the configversion or else the plugin will not work).

Each config version can be automatically updated by the one above it (except version 3 or lower). For example: If you have the configversion 4, than any plugin version in the configversion 5 category will automatically update the version of the plugin. Trying to update a configversion 4 with configversion 6 will not work!

Updating from 1.8.2 to 1.9.0

Several major config changes were made in CustomStructures 1.9.0. The naming convention of structure config files have been standardized. The structure of LootTables have also been changed slightly.

The plugin's auto updater will update all configuration files for you upon installing the new jar file and restarting the server.

Note: If you have updated the plugin from a previous config version in the past, be sure to delete your backup folder in the CustomStructures plugin folder before continuing.

Updating from 1.8.0 to 1.8.1

CustomStructures 1.8.1 changes the config version for a minor correction in the Sub-Schematic configuration format. The plugin should automatically update all structure configuration files for you on plugin startup. Please keep an eye on the logs to watch for any errors or actions that you need to do.

Note: If you have updated the plugin from a previous config version in the past, be sure to delete your backup folder in the CustomStructures plugin folder before continuing.

Updating from 1.7.1.1 to 1.8.0

CustomStructures 1.8.0 now requires Java 16 to run instead of Java 8. That means that your server must run Java 16 or above in order for CustomStructures to work!

No breaking changes have been made to the configuration files.

Updating from 1.5.8 to 1.6.0

Thanks to terrain generation changes in 1.17, the way SpawnY works needed to be modified. Even though 1.17 itself did not extend the world height in the base game, it allows datapacks to do so. That means it is now possible for blocks to spawn below Y 0 in 1.17 using datapacks (will be in Vanilla in 1.18).

The plugin will automatically update all of your structure files to the new SpawnY format. You should also review the structure formatting guide for the new format.

In 1.6.0 the auto updater will automatically make a backup directory within the CustomStructures folder that will contain backups of structure files and the config file. There will also be a .backup file that keeps track of which structures were already updated. That way if an error occurs mid update, you can fix the error and restart the server for the update to continue from where it left off.

  1. Ensure that the server is stopped.
  2. Download the new version from spigot and put it in the plugin folder.
  3. Start the server.
  4. Check for console output to see the success message.
    1. If everything worked you should see something similar to the following messages:
    [15:48:59] [Server thread/INFO]: [CustomStructures] Enabling CustomStructures v1.6.0
    [15:48:59] [Server thread/INFO]: [CustomStructures] An older version of the plugin has been detected!
    [15:48:59] [Server thread/INFO]: [CustomStructures] Automatically converting old format into the new one.
    [15:48:59] [Server thread/INFO]: [CustomStructures] Updating all structure config files...
    [15:48:59] [Server thread/INFO]: [CustomStructures] Successfully updated the structure: demo!
    [15:48:59] [Server thread/INFO]: [CustomStructures] Successfully updated the structure: test!
    [15:48:59] [Server thread/INFO]: [CustomStructures] Successfully updated all structure files to the latest version.
    [15:48:59] [Server thread/INFO]: [CustomStructures] Please delete the backup folder that was created in the CustomStructures directory after you confirm everything was updated correctly.
    
    1. If an error occurred you should see an error with an explicit message. Here are some errors that could occur:
    View more about possible errors
     
     [Server thread/ERROR]: [CustomStructures] An error has occurred when updating demo:
     [Server thread/ERROR]: [CustomStructures] {Long Stack Trace}
     [Server thread/ERROR]: [CustomStructures] After fixing the error, restart the server for the plugin to continue updating from where it left off.
     
     
    Fix that issue and restart the server. When the server restarts you should see a message that states:
    
     [Server thread/INFO]: [CustomStructures] Previous update attempt detected.
     [Server thread/INFO]: [CustomStructures] 1 completed structure updates were found. If this is your first time updating to this version of CustomStructures, then please delete the backup directory and restart the server.
     [Server thread/INFO]: [CustomStructures] The server will now wait 5 seconds to give you a chance to stop the server before the update automatically continues. Press ctrl+c to cancel running the server.
     
    Either wait the 5 seconds to continue the update from where it left off at, or stop the server with ctrl+c to prevent the update from continuing.
  5. If you are confidante that everything was updated correctly, delete the backup directory in the CustomStructures plugin folder.

The plugin is now completely updated.

Updating from 1.5.5 to 1.5.6

There has been a slight update to the way loot tables are handled. The auto updater should automatically update the plugin and the configuration file after installing the plugin.

  1. Make a backup (copy) of the CustomStructures folder.
  2. Download the new version from spigot and put it in the plugin folder.
  3. Start the server.
  4. If everything worked you should see the following messages:
[Server thread/INFO]: [CustomStructures] Enabling CustomStructures v1.5.6
[Server thread/INFO]: [CustomStructures] An older version of the plugin has been detected!
[Server thread/INFO]: [CustomStructures] Automatically converting old format into the new one.
[Server thread/INFO]: [CustomStructures] Updating loot tables.
[Server thread/INFO]: [CustomStructures] Successfully updated n structures!

Where n is the number of structures that were updated.

After that the plugin update is complete and you can start using the plugin as normal again.

Important Note: The plugin will update all structure configuration files within the structures folder whether they are active or not. Please remove all broken or invalid structure configuration files from that folder before attempting the update.

Updating from 1.4 to 1.5

Note: As of 1.5.6 the auto updater has been remove for configversion 4. Please use 1.5.5 to update your structures before trying to update to 1.5.6!

A lot has changed from 1.4 to 1.5. The way structures are configured are completely different!
For more information regarding the format changes click here.

Unlike previous versions of the plugin, 1.5 contains an automatic converter. The converter will run the moment you start the server with the new CustomStructures.jar file installed.

1) Installing the new Plugin

First stop the server.
Then go here to download the latest version of the plugin.

2) The Conversion Process

After doing step one, start the server back up again.
During the starting process you should see the following output from the console:

[Server thread/INFO]: [CustomStructures] Enabling CustomStructures v1.5
[Server thread/INFO]: [CustomStructures] An older version of the plugin has been detected!
[Server thread/INFO]: [CustomStructures] Automatically converting old format into the new one.

Before any converting is done, the plugin will create a backup of your config called config.yml.backup.
That file is a copy of the original config, that way if an error occurs your structures are safe.

If an error occurs create an issue here on github and copy and paste the output given from the plugin when in debug mode. (To enable debug mode set debug: false to debug: true in the config.yml.)

When the process is done you should see the following output in the console:

[Server thread/INFO]: [CustomStructures] Successfully converted 3 structures to the new format!

Followed by the normal startup log.

3) Ensuring the Conversion was Successful.

It is a good idea to go back through and ensure everything is configured the way you want it to be.

Important Conversion Notes

  1. The plugin does not convert the useOceanFloor property in the Ocean_Properties. You must enable that yourself after the conversion by setting SpawnY in the StructureLocation properties to ocean_floor. Example: SpawnY: ocean_floor
  2. spawnInLiquid only translates to the StructureProperties.spawnInWater property.
  3. If you have all of the worlds enabled the plugin will convert that to Worlds: [] in StructureLocation. That is perfectly valid and will achieve the same effect. You can remove it if you wish to.
  4. A LootTable values will be changed to decimal values, that is also ok. Example lootTable: 5.0
  5. The config file will have no spacing after the conversion. The configversion: 5 should never be changed.
  6. New features are not auto generated by the plugin. You must add in new features yourself.
Clone this wiki locally