Fix some reload issues.

And some unload issues.
Dieser Commit ist enthalten in:
wizjany 2019-06-11 18:02:07 -04:00
Ursprung fd1178a3d0
Commit efb7650d6f
2 geänderte Dateien mit 7 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -315,7 +315,8 @@ public class BukkitWorld extends AbstractWorld {
} else if (other == null) {
return false;
} else if ((other instanceof BukkitWorld)) {
return ((BukkitWorld) other).getWorld().equals(getWorld());
World otherWorld = ((BukkitWorld) other).worldRef.get();
return otherWorld != null && otherWorld.equals(getWorld());
} else if (other instanceof com.sk89q.worldedit.world.World) {
return ((com.sk89q.worldedit.world.World) other).getName().equals(getName());
} else {

Datei anzeigen

@ -136,10 +136,15 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
// these don't stick around between reload
loadAdapter();
loadConfig();
WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent());
} catch (Throwable ignored) {
}
} else {
getServer().getPluginManager().registerEvents((worldInitListener = new WorldInitListener()), this);
loadAdapter(); // Need an adapter to work with special blocks with NBT data
setupRegistries();
WorldEdit.getInstance().loadMappings();
loadConfig(); // Load configuration
}
// Enable metrics
@ -148,12 +153,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
}
private void setupWorldData() {
loadAdapter(); // Need an adapter to work with special blocks with NBT data
setupRegistries();
WorldEdit.getInstance().loadMappings();
loadConfig(); // Load configuration
setupTags();
WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent());
}