mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
parent
32540c23ab
commit
7da90b3a6b
@ -196,27 +196,34 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
|||||||
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
|
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
|
||||||
upgrade.beforeSettings();
|
upgrade.beforeSettings();
|
||||||
execTimer.mark("Upgrade");
|
execTimer.mark("Upgrade");
|
||||||
|
|
||||||
confList = new ArrayList<>();
|
confList = new ArrayList<>();
|
||||||
settings = new Settings(this);
|
settings = new Settings(this);
|
||||||
confList.add(settings);
|
confList.add(settings);
|
||||||
execTimer.mark("Settings");
|
execTimer.mark("Settings");
|
||||||
|
|
||||||
userMap = new UserMap(this);
|
userMap = new UserMap(this);
|
||||||
confList.add(userMap);
|
confList.add(userMap);
|
||||||
execTimer.mark("Init(Usermap)");
|
execTimer.mark("Init(Usermap)");
|
||||||
|
|
||||||
kits = new Kits(this);
|
kits = new Kits(this);
|
||||||
confList.add(kits);
|
confList.add(kits);
|
||||||
upgrade.convertKits();
|
upgrade.convertKits();
|
||||||
execTimer.mark("Kits");
|
execTimer.mark("Kits");
|
||||||
|
|
||||||
upgrade.afterSettings();
|
upgrade.afterSettings();
|
||||||
execTimer.mark("Upgrade2");
|
execTimer.mark("Upgrade2");
|
||||||
|
|
||||||
warps = new Warps(getServer(), this.getDataFolder());
|
warps = new Warps(getServer(), this.getDataFolder());
|
||||||
confList.add(warps);
|
confList.add(warps);
|
||||||
execTimer.mark("Init(Spawn/Warp)");
|
execTimer.mark("Init(Spawn/Warp)");
|
||||||
|
|
||||||
worth = new Worth(this.getDataFolder());
|
worth = new Worth(this.getDataFolder());
|
||||||
confList.add(worth);
|
confList.add(worth);
|
||||||
itemDb = getItemDbFromConfig();
|
itemDb = getItemDbFromConfig();
|
||||||
confList.add(itemDb);
|
confList.add(itemDb);
|
||||||
execTimer.mark("Init(Worth/ItemDB)");
|
execTimer.mark("Init(Worth/ItemDB)");
|
||||||
|
|
||||||
jails = new Jails(this);
|
jails = new Jails(this);
|
||||||
confList.add(jails);
|
confList.add(jails);
|
||||||
execTimer.mark("Init(Jails)");
|
execTimer.mark("Init(Jails)");
|
||||||
@ -241,6 +248,10 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
|||||||
), "potion meta").getProvider();
|
), "potion meta").getProvider();
|
||||||
execTimer.mark("Init(Providers)");
|
execTimer.mark("Init(Providers)");
|
||||||
reload();
|
reload();
|
||||||
|
|
||||||
|
// The item spawn blacklist is loaded with all other settings, before the item
|
||||||
|
// DB, but it depends on the item DB, so we need to reload it again here:
|
||||||
|
((Settings) settings)._lateLoadItemSpawnBlacklist();
|
||||||
} catch (YAMLException exception) {
|
} catch (YAMLException exception) {
|
||||||
if (pm.getPlugin("EssentialsUpdate") != null) {
|
if (pm.getPlugin("EssentialsUpdate") != null) {
|
||||||
LOGGER.log(Level.SEVERE, tl("essentialsHelp2"));
|
LOGGER.log(Level.SEVERE, tl("essentialsHelp2"));
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.earth2me.essentials;
|
package com.earth2me.essentials;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.api.IItemDb;
|
||||||
import com.earth2me.essentials.commands.IEssentialsCommand;
|
import com.earth2me.essentials.commands.IEssentialsCommand;
|
||||||
import com.earth2me.essentials.signs.EssentialsSign;
|
import com.earth2me.essentials.signs.EssentialsSign;
|
||||||
import com.earth2me.essentials.signs.Signs;
|
import com.earth2me.essentials.signs.Signs;
|
||||||
@ -541,7 +542,11 @@ public class Settings implements net.ess3.api.ISettings {
|
|||||||
allowOldIdSigns = _allowOldIdSigns();
|
allowOldIdSigns = _allowOldIdSigns();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Material> itemSpawnBl = new ArrayList<Material>();
|
void _lateLoadItemSpawnBlacklist() {
|
||||||
|
itemSpawnBl = _getItemSpawnBlacklist();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Material> itemSpawnBl = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Material> itemSpawnBlacklist() {
|
public List<Material> itemSpawnBlacklist() {
|
||||||
@ -550,7 +555,8 @@ public class Settings implements net.ess3.api.ISettings {
|
|||||||
|
|
||||||
private List<Material> _getItemSpawnBlacklist() {
|
private List<Material> _getItemSpawnBlacklist() {
|
||||||
final List<Material> epItemSpwn = new ArrayList<>();
|
final List<Material> epItemSpwn = new ArrayList<>();
|
||||||
if (ess.getItemDb() == null) {
|
final IItemDb itemDb = ess.getItemDb();
|
||||||
|
if (itemDb == null || !itemDb.isReady()) {
|
||||||
logger.log(Level.FINE, "Skipping item spawn blacklist read; item DB not yet loaded.");
|
logger.log(Level.FINE, "Skipping item spawn blacklist read; item DB not yet loaded.");
|
||||||
return epItemSpwn;
|
return epItemSpwn;
|
||||||
}
|
}
|
||||||
@ -560,7 +566,7 @@ public class Settings implements net.ess3.api.ISettings {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final ItemStack iStack = ess.getItemDb().get(itemName);
|
final ItemStack iStack = itemDb.get(itemName);
|
||||||
epItemSpwn.add(iStack.getType());
|
epItemSpwn.add(iStack.getType());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
logger.log(Level.SEVERE, tl("unknownItemInList", itemName, "item-spawn-blacklist"), ex);
|
logger.log(Level.SEVERE, tl("unknownItemInList", itemName, "item-spawn-blacklist"), ex);
|
||||||
|
Loading…
Reference in New Issue
Block a user