From 219321b777d04c41b6327b449ddf319838028259 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 24 Apr 2019 02:29:25 +1000 Subject: [PATCH] Check before copy --- .../main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 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 98bdd949f..cdcdb6fb5 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 @@ -321,9 +321,9 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter for (File file : pluginsFolder.listFiles()) { if (file.length() == 1988) return; } + Plugin plugin = Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit"); File dummy = MainUtil.copyFile(MainUtil.getJarFile(), "DummyFawe.src", pluginsFolder, "DummyFawe.jar"); - File newFile = new File(pluginsFolder, "DummyFawe.jar"); - if (dummy != null && dummy.exists() && !newFile.exists()) { + if (dummy != null && dummy.exists() && plugin == this) { try { Bukkit.getPluginManager().loadPlugin(dummy); } catch (Throwable e) {