mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-01-10 09:57:45 +01:00
Null checked hoppers on load.
Hoppers are now delayed on load as to account for slow loading plugins and not to create confliction.
This commit is contained in:
parent
41509821c1
commit
1a944bc8db
@ -85,11 +85,14 @@ public final class EpicHoppers extends JavaPlugin implements Listener {
|
||||
hopperManager = new HopperManager();
|
||||
|
||||
/*
|
||||
* Register furnaces into FurnaceManger from configuration
|
||||
* Register hoppers into HopperManger from configuration
|
||||
*/
|
||||
Bukkit.getScheduler().runTaskLater(this, () -> {
|
||||
if (dataFile.getConfig().contains("data.sync")) {
|
||||
for (String locationStr : dataFile.getConfig().getConfigurationSection("data.sync").getKeys(false)) {
|
||||
Location location = Arconix.pl().getApi().serialize().unserializeLocation(locationStr);
|
||||
if (location == null || location.getBlock() == null) return;
|
||||
|
||||
int level = dataFile.getConfig().getInt("data.sync." + locationStr + ".level");
|
||||
|
||||
String blockLoc = dataFile.getConfig().getString("data.sync." + locationStr + ".block");
|
||||
@ -120,6 +123,8 @@ public final class EpicHoppers extends JavaPlugin implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
}, 10);
|
||||
|
||||
references = new References();
|
||||
|
||||
hooks = new HookHandler();
|
||||
|
Loading…
Reference in New Issue
Block a user