From 6c7a49733c0fde491f615cc71b68c18a2d35c5ec Mon Sep 17 00:00:00 2001 From: Pieter12345 Date: Sun, 26 Aug 2018 21:34:33 +0200 Subject: [PATCH] Fix plugin enabling on Bukkit without compatible adapter When loading WorldEdit on a Bukkit server which it does not have an adapter for, a stacktrace is printed to console and WorldEdit does not load. This commit fixes that by registering the BukkitServerInterface before attempting to find a matching adapter. --- .../main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index ab0d08fba..324babd4f 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -82,11 +82,10 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter { WorldEdit worldEdit = WorldEdit.getInstance(); - loadAdapter(); // Need an adapter to work with special blocks with NBT data - // Setup platform server = new BukkitServerInterface(this, getServer()); worldEdit.getPlatformManager().register(server); + loadAdapter(); // Need an adapter to work with special blocks with NBT data worldEdit.loadMappings(); loadConfig(); // Load configuration