Set the disguise radius in config if not set

This commit is contained in:
Andrew 2013-07-22 22:36:38 +12:00
parent e7f283dc25
commit 0898c3c387

View file

@ -214,6 +214,10 @@ public class LibsDisguises extends JavaPlugin {
DisguiseAPI.setVelocitySent(true);
addPacketListeners();
saveDefaultConfig();
if (!getConfig().contains("DisguiseRadiusMax"))
getConfig().set("DisguiseRadiusMax", getConfig().getInt("DisguiseRadiusMax"));
if (!getConfig().contains("UndisguiseRadiusMax"))
getConfig().set("UndisguiseRadiusMax", getConfig().getInt("UndisguiseRadiusMax"));
DisguiseListener listener = new DisguiseListener(this);
Bukkit.getPluginManager().registerEvents(listener, this);
getCommand("disguise").setExecutor(new DisguiseCommand());