diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-02-29 10:27:38 -0600 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-02-29 12:15:31 -0500 |
commit | 403f8747841329452ac0dbc28df25171e6dc72ec (patch) | |
tree | 1f7fea352afacc92142e1f6fe2de22a9406c074f /src | |
parent | 257fd162423825bcdc7375b790df00a81cedee7c (diff) | |
download | craftbukkit-403f8747841329452ac0dbc28df25171e6dc72ec.tar craftbukkit-403f8747841329452ac0dbc28df25171e6dc72ec.tar.gz craftbukkit-403f8747841329452ac0dbc28df25171e6dc72ec.tar.lz craftbukkit-403f8747841329452ac0dbc28df25171e6dc72ec.tar.xz craftbukkit-403f8747841329452ac0dbc28df25171e6dc72ec.zip |
[Bleeding] Fix generics. Addresses BUKKIT-844
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 7589fe26..0e46b364 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -106,6 +106,7 @@ import com.avaje.ebean.config.DataSourceConfig; import com.avaje.ebean.config.ServerConfig; import com.avaje.ebean.config.dbplatform.SQLitePlatform; import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; +import com.google.common.collect.ImmutableList; import com.google.common.collect.MapMaker; import jline.ConsoleReader; @@ -810,18 +811,17 @@ public final class CraftServer implements Server { public Iterator<Recipe> recipeIterator() { return new RecipeIterator(); } - + public void clearRecipes() { CraftingManager.getInstance().b.clear(); FurnaceRecipes.getInstance().b().clear(); } - + public void resetRecipes() { CraftingManager.getInstance().b = new CraftingManager().b; FurnaceRecipes.getInstance().b = new FurnaceRecipes().b; } - @SuppressWarnings("unchecked") public Map<String, String[]> getCommandAliases() { ConfigurationSection section = configuration.getConfigurationSection("aliases"); Map<String, String[]> result = new LinkedHashMap<String, String[]>(); @@ -831,10 +831,9 @@ public final class CraftServer implements Server { List<String> commands = null; if (section.isList(key)) { - commands = section.getList(key); + commands = section.getStringList(key); } else { - commands = new ArrayList<String>(); - commands.add(section.getString(key)); + commands = ImmutableList.<String>of(section.getString(key)); } result.put(key, commands.toArray(new String[0])); |