Variable names, unlimited mobs and a group sign bug
This commit is contained in:
Daniel Saukel 2015-12-27 19:27:55 +01:00
parent 0cc9a28f4d
commit 0b0e676733
3 changed files with 13 additions and 12 deletions

View File

@ -79,14 +79,14 @@ public class WorldConfig {
@SuppressWarnings("deprecation")
public void load(ConfigurationSection configFile) {
/* Classes */
ConfigurationSection configSetionClasses = configFile.getConfigurationSection("classes");
if (configSetionClasses != null) {
Set<String> list = configSetionClasses.getKeys(false);
ConfigurationSection configSectionClasses = configFile.getConfigurationSection("classes");
if (configSectionClasses != null) {
Set<String> list = configSectionClasses.getKeys(false);
for (String className : list) {
String name = className;
boolean hasDog = configSetionClasses.getBoolean(className + ".dog");
boolean hasDog = configSectionClasses.getBoolean(className + ".dog");
/* Items */
List<String> items = configSetionClasses.getStringList(className + ".items");
List<String> items = configSectionClasses.getStringList(className + ".items");
CopyOnWriteArrayList<ItemStack> istacks = new CopyOnWriteArrayList<ItemStack>();
for (String item : items) {
@ -132,12 +132,12 @@ public class WorldConfig {
}
/* Messages */
ConfigurationSection configSetionMessages = configFile.getConfigurationSection("message");
if (configSetionMessages != null) {
Set<String> list = configSetionMessages.getKeys(false);
ConfigurationSection configSectionMessages = configFile.getConfigurationSection("message");
if (configSectionMessages != null) {
Set<String> list = configSectionMessages.getKeys(false);
for (String messagePath : list) {
int messageId = IntegerUtil.parseInt(messagePath);
msgs.put(messageId, configSetionMessages.getString(messagePath));
msgs.put(messageId, configSectionMessages.getString(messagePath));
}
}
@ -257,8 +257,8 @@ public class WorldConfig {
}
/* Mobtypes */
configSetionMessages = configFile.getConfigurationSection("mobTypes");
mobTypes = DMobType.load(configSetionMessages);
configSectionMessages = configFile.getConfigurationSection("mobTypes");
mobTypes = DMobType.load(configSectionMessages);
}
@SuppressWarnings("deprecation")

View File

@ -87,6 +87,7 @@ public class DPortal {
if (dgroup == null) {
MessageUtil.sendMessage(player, plugin.getDMessages().get("Error_NotInGroup"));
return;
}
if (dgroup.getGameWorld() == null) {

View File

@ -108,7 +108,7 @@ public class DMobType {
Set<DMobType> set = new HashSet<DMobType>();
if (configFile == null) {
return null;
return set;
}
// Read Mobs