mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-03-28 22:45:52 +01:00
Fixed the config-file reset bug.
This commit is contained in:
parent
6ade558eeb
commit
a94370deec
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
<property name="bin" location="build" />
|
||||
<property name="lib" location="lib" />
|
||||
<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-dest" location="${res}/res/abilities" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: MobArena
|
||||
author: garbagemule
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.94.4.79
|
||||
version: 0.94.4.80
|
||||
softdepend: [Spout,MultiVerse,MultiWorld,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
||||
commands:
|
||||
ma:
|
||||
|
@ -6,7 +6,6 @@ import java.util.Map;
|
||||
import com.garbagemule.MobArena.framework.Arena;
|
||||
import com.garbagemule.MobArena.util.MutableInt;
|
||||
import com.garbagemule.MobArena.util.config.ConfigSection;
|
||||
import com.garbagemule.MobArena.util.config.ConfigUtils;
|
||||
|
||||
public class ClassLimitManager
|
||||
{
|
||||
|
@ -113,7 +113,10 @@ public class MobArena extends JavaPlugin
|
||||
|
||||
File file = new File(this.getDataFolder(), "config.yml");
|
||||
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);
|
||||
config.setHeader(getHeader());
|
||||
|
@ -284,6 +284,7 @@ public class MAGlobalListener implements Listener
|
||||
case REJECT:
|
||||
allow = false;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,8 @@ import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.garbagemule.MobArena.Messenger;
|
||||
|
||||
/**
|
||||
* Wrapper class for Bukkit's Configuration classes.
|
||||
*
|
||||
@ -80,7 +82,7 @@ public class Config
|
||||
return true;
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Messenger.severe("The config-file failed to load. This is the error:\n" + e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user