mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-28 00:17:11 +00:00
Heavy cleanup of all classes
ItemDb is not static anymore Essentials.getStatic() removed
This commit is contained in:
parent
25c9557c59
commit
a38fe6acd4
48 changed files with 330 additions and 294 deletions
|
@ -13,12 +13,14 @@ import org.bukkit.inventory.ItemStack;
|
|||
|
||||
public class Settings implements IConf
|
||||
{
|
||||
private final EssentialsConf config;
|
||||
private final transient EssentialsConf config;
|
||||
private final static Logger logger = Logger.getLogger("Minecraft");
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public Settings(File dataFolder)
|
||||
public Settings(IEssentials ess)
|
||||
{
|
||||
config = new EssentialsConf(new File(dataFolder, "config.yml"));
|
||||
this.ess = ess;
|
||||
config = new EssentialsConf(new File(ess.getDataFolder(), "config.yml"));
|
||||
config.setTemplateName("/config.yml");
|
||||
config.load();
|
||||
}
|
||||
|
@ -275,7 +277,7 @@ public class Settings implements IConf
|
|||
}
|
||||
ItemStack is;
|
||||
try {
|
||||
is = ItemDb.get(itemName);
|
||||
is = ess.getItemDb().get(itemName);
|
||||
epItemSpwn.add(is.getTypeId());
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "item-spawn-blacklist"));
|
||||
|
@ -357,7 +359,7 @@ public class Settings implements IConf
|
|||
}
|
||||
ItemStack itemStack;
|
||||
try {
|
||||
itemStack = ItemDb.get(itemName);
|
||||
itemStack = ess.getItemDb().get(itemName);
|
||||
list.add(itemStack.getTypeId());
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, configName));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue