mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 19:51:36 +01:00
Fix for loading worlds.
This commit is contained in:
parent
d48b3fd4ee
commit
0d4441e233
@ -150,6 +150,7 @@ public class UltimateKits extends JavaPlugin {
|
|||||||
* Load configuration files into memory.
|
* Load configuration files into memory.
|
||||||
*/
|
*/
|
||||||
private void loadFromFile() {
|
private void loadFromFile() {
|
||||||
|
Bukkit.getScheduler().runTaskLater(this, () -> {
|
||||||
|
|
||||||
//Empty kits from manager.
|
//Empty kits from manager.
|
||||||
kitManager.clearKits();
|
kitManager.clearKits();
|
||||||
@ -196,7 +197,8 @@ public class UltimateKits extends JavaPlugin {
|
|||||||
boolean itemOverride = dataFile.getConfig().getBoolean("BlockData." + key + ".itemOverride");
|
boolean itemOverride = dataFile.getConfig().getBoolean("BlockData." + key + ".itemOverride");
|
||||||
|
|
||||||
if (kit == null) dataFile.getConfig().set("BlockData." + key, null);
|
if (kit == null) dataFile.getConfig().set("BlockData." + key, null);
|
||||||
else kitManager.addKitToLocation(kit, location, type, holograms, particles, displayItems, itemOverride);
|
else
|
||||||
|
kitManager.addKitToLocation(kit, location, type, holograms, particles, displayItems, itemOverride);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,6 +224,7 @@ public class UltimateKits extends JavaPlugin {
|
|||||||
if (hologram != null)
|
if (hologram != null)
|
||||||
hologram.loadHolograms();
|
hologram.loadHolograms();
|
||||||
|
|
||||||
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerVersion getServerVersion() {
|
public ServerVersion getServerVersion() {
|
||||||
|
Loading…
Reference in New Issue
Block a user