mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-02 10:36:39 +00:00
[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:
parent
8539f28146
commit
20d51e3311
5 changed files with 136 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue