From 84c3ace9e0bdf115619ca06187f2738ddf222bd9 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Fri, 13 May 2011 00:05:40 -0400 Subject: [PATCH] Made CUI selection clear on disable (including Bukkit's /reload) --- src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index 97f97b8bf..bbceffbdf 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -38,6 +38,7 @@ import com.sk89q.bukkit.migration.PermissionsResolverServerListener; import com.sk89q.worldedit.*; import com.sk89q.worldedit.bags.BlockBag; import com.sk89q.worldedit.bukkit.selections.*; +import com.sk89q.worldedit.cui.SelectionShapeEvent; import com.sk89q.worldedit.regions.*; /** @@ -111,6 +112,9 @@ public class WorldEditPlugin extends JavaPlugin { */ public void onDisable() { controller.clearSessions(); + for (Player player : getServer().getOnlinePlayers()) { + wrapPlayer(player).dispatchCUIEvent(new SelectionShapeEvent("cuboid")); + } config.unload(); }