Fixed the config-file reset bug.
This commit is contained in:
Binary file not shown.
@@ -7,7 +7,7 @@
|
|||||||
<property name="bin" location="build" />
|
<property name="bin" location="build" />
|
||||||
<property name="lib" location="lib" />
|
<property name="lib" location="lib" />
|
||||||
<property name="res" location="resources" />
|
<property name="res" location="resources" />
|
||||||
<property name="server" location="D:\General\Java\Minecraft\Minecraft Server\plugins" />
|
<property name="server" location="D:\General\Java\Eclipse\Minecraft\Minecraft Server\plugins" />
|
||||||
|
|
||||||
<property name="ability-src" location="abilities" />
|
<property name="ability-src" location="abilities" />
|
||||||
<property name="ability-dest" location="${res}/res/abilities" />
|
<property name="ability-dest" location="${res}/res/abilities" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: MobArena
|
name: MobArena
|
||||||
author: garbagemule
|
author: garbagemule
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.94.4.79
|
version: 0.94.4.80
|
||||||
softdepend: [Spout,MultiVerse,MultiWorld,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
softdepend: [Spout,MultiVerse,MultiWorld,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import java.util.Map;
|
|||||||
import com.garbagemule.MobArena.framework.Arena;
|
import com.garbagemule.MobArena.framework.Arena;
|
||||||
import com.garbagemule.MobArena.util.MutableInt;
|
import com.garbagemule.MobArena.util.MutableInt;
|
||||||
import com.garbagemule.MobArena.util.config.ConfigSection;
|
import com.garbagemule.MobArena.util.config.ConfigSection;
|
||||||
import com.garbagemule.MobArena.util.config.ConfigUtils;
|
|
||||||
|
|
||||||
public class ClassLimitManager
|
public class ClassLimitManager
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ public class MobArena extends JavaPlugin
|
|||||||
|
|
||||||
File file = new File(this.getDataFolder(), "config.yml");
|
File file = new File(this.getDataFolder(), "config.yml");
|
||||||
config = new Config(file);
|
config = new Config(file);
|
||||||
config.load();
|
if (!config.load()) {
|
||||||
|
this.getServer().getPluginManager().disablePlugin(this);
|
||||||
|
throw new IllegalStateException("The config-file could not be loaded! Read further up to find the actual bug!");
|
||||||
|
}
|
||||||
|
|
||||||
updateSettings(config);
|
updateSettings(config);
|
||||||
config.setHeader(getHeader());
|
config.setHeader(getHeader());
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ public class MAGlobalListener implements Listener
|
|||||||
case REJECT:
|
case REJECT:
|
||||||
allow = false;
|
allow = false;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import org.bukkit.configuration.ConfigurationSection;
|
|||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import com.garbagemule.MobArena.Messenger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class for Bukkit's Configuration classes.
|
* Wrapper class for Bukkit's Configuration classes.
|
||||||
*
|
*
|
||||||
@@ -80,7 +82,7 @@ public class Config
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
Messenger.severe("The config-file failed to load. This is the error:\n" + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user