Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by kinukin, Jun 4, 2017.
How would I create something like an motd with no value in a custom config?
I really don't understand what you mean but when it comes to storing a string such as a MOTD you can just hard code it (just code a set MOTD in the plugin) or make it editable by using a config. If you are having troubles with configs there are many tutorials out there to help you
I think I know what you meant, you can do getConfig().setDefault("MOTD", "This Is The Message Of The Day!");
But that's for defaults for strings I think there is a getConfig().setString("MOTD", "This Is The Message Of The Day!");
I can't edit it inside the config, it keeps getting reset to its set string.
Means you aren't updating and saving it right, try this on your onEnable or perhaps make a command that does this so you can reload it inside the server.
getConfig().getKeys(false); /*Comment: Can be true or false doesn't matter*/
Check out this video from Pogostick29 where he creates a MOTD and adds a config.