From ff8f7a0867822c6ac2a24f55cdb56f05249a7245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Fri, 15 May 2020 19:12:39 +0200 Subject: [PATCH] Actually create the world managers --- .../java/com/plotsquared/bukkit/BukkitMain.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index 2c30562a6..779aec999 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -33,6 +33,9 @@ import com.plotsquared.bukkit.listener.PaperListener; import com.plotsquared.bukkit.listener.PlayerEvents; import com.plotsquared.bukkit.listener.SingleWorldListener; import com.plotsquared.bukkit.listener.WorldEvents; +import com.plotsquared.bukkit.managers.BukkitWorldManager; +import com.plotsquared.bukkit.managers.HyperverseWorldManager; +import com.plotsquared.bukkit.managers.MultiverseWorldManager; import com.plotsquared.bukkit.placeholder.PlaceholderFormatter; import com.plotsquared.bukkit.placeholder.Placeholders; import com.plotsquared.bukkit.queue.BukkitLocalQueue; @@ -247,6 +250,17 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain PlotSquared.log(Captions.PREFIX + "&6Backup features will be disabled"); this.backupManager = new NullBackupManager(); } + + if (Bukkit.getPluginManager().getPlugin("Hyperverse") != null) { + this.worldManager = new HyperverseWorldManager(); + } else if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) { + this.worldManager = new MultiverseWorldManager(); + } else { + this.worldManager = new BukkitWorldManager(); + } + + PlotSquared.log(Captions.PREFIX.getTranslated() + "Using platform world manager: " + + this.worldManager.getName()); } private void unload() {