mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-09-28 23:27:27 +02:00
Revamp config to simpler 2.4 format
This commit is contained in:
parent
fba3f71238
commit
b2ef10a699
@ -258,20 +258,16 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
||||
this.multiverseConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml"));
|
||||
Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream("/defaults/config.yml"));
|
||||
this.multiverseConfig.setDefaults(coreDefaults);
|
||||
this.multiverseConfig.options().copyDefaults(true);
|
||||
this.worldManager.loadWorldConfig(new File(getDataFolder(), "worlds.yml"));
|
||||
|
||||
// Setup the Debug option, we'll default to false because this option will not be in the default config.
|
||||
GlobalDebug = this.multiverseConfig.getInt("debug", 0);
|
||||
// Lets cache this value due to the fact that it will be accessed many times.
|
||||
// Lets cache these values due to the fact that they will be accessed many times.
|
||||
EnforceAccess = this.multiverseConfig.getBoolean("enforceaccess", false);
|
||||
EnforceGameModes = this.multiverseConfig.getBoolean("enforcegamemodes", true);
|
||||
PrefixChat = this.multiverseConfig.getBoolean("worldnameprefix", true);
|
||||
BedRespawn = this.multiverseConfig.getBoolean("bedrespawn", true);
|
||||
this.multiverseConfig.set("enforceaccess", EnforceAccess);
|
||||
this.multiverseConfig.set("enforcegamemodes", EnforceGameModes);
|
||||
this.multiverseConfig.set("bedrespawn", BedRespawn);
|
||||
this.multiverseConfig.set("worldnameprefix", PrefixChat);
|
||||
this.multiverseConfig.set("debug", GlobalDebug);
|
||||
this.messaging = new MVMessaging(this);
|
||||
this.messaging.setCooldown(this.multiverseConfig.getInt("messagecooldown", 5000));
|
||||
this.saveMVConfigs();
|
||||
|
@ -28,6 +28,7 @@ public class ConfigCommand extends MultiverseCommand {
|
||||
this.addKey("mvconfig");
|
||||
this.addKey("mv conf");
|
||||
this.addKey("mvconf");
|
||||
this.addCommandExample("All values: " + ConfigProperty.getAllValues());
|
||||
this.addCommandExample("/mv config " + ChatColor.GREEN + "debug" + ChatColor.AQUA + " 3");
|
||||
this.addCommandExample("/mv config " + ChatColor.GREEN + "enforceaccess" + ChatColor.AQUA + " false");
|
||||
this.addCommandExample("/mv config " + ChatColor.GREEN + "bedrespawn" + ChatColor.AQUA + " true");
|
||||
|
@ -1,42 +1,11 @@
|
||||
# !!!This only applies to worlds being handled by Multiverse!!!
|
||||
# If you don't see it using /mvlist this setting WILL HAVE NO EFFECT
|
||||
# This is the MV2 Config. If you mess it up, copy the values out
|
||||
# Delete it, and it will be regenerated. Then use the ingame interface
|
||||
# to add your values back.
|
||||
# A config with explanations can be found here:
|
||||
# https://github.com/Multiverse/Multiverse-Core/wiki/config.yml
|
||||
|
||||
# How long to leave in between sending a message to the player. (NOT YET IMPLEMENTED)
|
||||
# In Milliseconds - Default is '5000' which is 5 Seconds.
|
||||
messagecooldown: 5000
|
||||
|
||||
# How fast are people allowed to use /MVTP (NOT YET IMPLEMENTED)
|
||||
# In Milliseconds - Default is '5000' which is 5 Seconds.
|
||||
teleportcooldown: 5000
|
||||
|
||||
# If this is set to true, we will prefix the chat with
|
||||
# a colorful world alias if it's present. If not, we simply
|
||||
# show the world's name in white. If this is false Multiverse
|
||||
# won't touch your chat
|
||||
worldnameprefix: true
|
||||
|
||||
# If value is set to false, Multiverse will NOT enforce
|
||||
# world access permissions
|
||||
enforceaccess: false
|
||||
|
||||
# If value is set to false, Multiverse will NOT enforce
|
||||
# world access permissions
|
||||
enforceaccess: true
|
||||
enforcegamemodes: true
|
||||
|
||||
# If you have a world(s) that has monsters = false, and you want to disable the built
|
||||
# in autohealing, set this to true. This will have NO EFFECT if monsters = true for a given world.
|
||||
# MOVED TO PER-WORLD SETTING!!!
|
||||
# disableautoheal: false
|
||||
|
||||
# This will use the old style of PVP prevention so you can have zones of PVP
|
||||
# Players will be notified when they punch/shoot and it's not allowed.
|
||||
# MOVED TO PER-WORLD SETTING!!!
|
||||
# fakepvp: false
|
||||
|
||||
# When this is enabled, users will spawn at their last bed slept at. If the bed is destroyed or obstructed,
|
||||
# they will spawn according to your mvm respawn rules, and then whatever the server does.
|
||||
bedrespawn: true
|
||||
|
||||
# This just signifies the version number so we can see what version of config you have.
|
||||
# NEVER TOUCH THIS VALUE
|
||||
version: 2.3
|
||||
version: 2.4
|
||||
|
Loading…
Reference in New Issue
Block a user