We now ignore the case, when we read the kits from config.yml.

Beware, that permissions always have to be lowercase.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1463 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-05-14 11:20:05 +00:00
parent 7b9606994a
commit 47f1b2809b
2 changed files with 9 additions and 3 deletions

View file

@ -137,7 +137,13 @@ public class Settings implements IConf
public Object getKit(String name)
{
Map<String, Object> kits = (Map<String, Object>)config.getProperty("kits");
return kits.get(name.replace('.', '_').replace('/', '_'));
for (Map.Entry<String, Object> entry : kits.entrySet())
{
if (entry.getKey().equalsIgnoreCase(name.replace('.', '_').replace('/', '_'))) {
return entry.getValue();
}
}
return null;
}
public ChatColor getOperatorColor() throws Exception