Automatically rename Biomes, Materials,... in configs to 1.13 names

Discussion in 'Spigot Plugin Development' started by joblo.2213, Jul 16, 2018.

  1. So, 1.13 is comming and with it a ton of changes.

    The ones that I want to talk about are the following:
    • The internal name strings of several EntityTypes have been changed following their changes in Vanilla
    • Two paintings, BURNINGSKULL and DONKEYKONG have been renamed to BURNING_SKULL and DONKEY_KONG respectively to bring them in line with Vanilla name
    • All Materials have been renamed to match the names used in Vanilla
    • The Biome enum has been brought into line with the new Vanilla biome names
    • A significant number of Sounds have been added/removed/renamed to the Sound enum
    (did I miss some renamed enums? Then please inform me!)

    Many of them are used in the configuration of my plugin. So to have a easy transition from 1.12 to 1.13 I'dd like to update the configuration files and replace all old names with the new ones.

    Therfore I'm looking into if there are some API methods that can do this or if I have to replace each string individually.

    I'm also thinking that I'm not the only one with that problem so maybe somebody already has created a code snippet that can do this?

    Note:
    I'm not looking for the actuall mechanic thats replacing strings inside the config, I can do this on my own.
    Instead I'm searching for something that helps me getting a new name from an old one.

    Thanks for your answers!
     
  2. md_5

    Administrator Developer

    Materials have an API method listed in the original post (scroll down to the "big ones" section).

    Biomes do not unfortunately.
     
    • Useful Useful x 1
  3. So does anybody have come up with something for the sounds and biomes?