[trunk] Infinite placement of blocks, egg throws, buckets

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1100 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-04-03 14:25:10 +00:00
parent 8539f28146
commit 20d51e3311
5 changed files with 136 additions and 0 deletions

View file

@ -433,4 +433,35 @@ public class Settings implements IConf
}
return epBreakList;
}
boolean isInfinitePlacingEnabled() {
return config.getBoolean("infinite.placing",false);
}
boolean isInfiniteEggThrowEnabled() {
return config.getBoolean("infinite.eggthrow",false);
}
boolean isInfiniteBucketsEnabled() {
return config.getBoolean("infinite.buckets",false);
}
public ArrayList<Integer> getInfiniteWhitelist()
{
ArrayList<Integer> infiniteWhitelist = new ArrayList<Integer>();
for (String itemName : config.getString("infinite.whitelist", "").split(",")) {
itemName = itemName.trim();
if (itemName.isEmpty()) {
continue;
}
ItemStack is;
try {
is = ItemDb.get(itemName);
infiniteWhitelist.add(is.getTypeId());
} catch (Exception ex) {
logger.log(Level.SEVERE, "Unknown item " + itemName + " in infinite whitelist.");
}
}
return infiniteWhitelist;
}
}