From e70c82c7c0609a5a95869c18b37b1c41e4480837 Mon Sep 17 00:00:00 2001 From: ReneZeidler Date: Sat, 1 Feb 2014 07:23:01 -0800 Subject: [PATCH] Don't send SelectionShapeEvent events in the describeCUI/describeLegacyCUI methods, that event is already sent in dispatchCUISelection in LocalSession --- .../worldedit/regions/ConvexPolyhedralRegionSelector.java | 6 +----- .../com/sk89q/worldedit/regions/CylinderRegionSelector.java | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/regions/ConvexPolyhedralRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/ConvexPolyhedralRegionSelector.java index ba4d941ea..6131c7435 100644 --- a/src/main/java/com/sk89q/worldedit/regions/ConvexPolyhedralRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/ConvexPolyhedralRegionSelector.java @@ -183,9 +183,7 @@ public class ConvexPolyhedralRegionSelector implements RegionSelector, CUIRegion public void describeCUI(LocalSession session, LocalPlayer player) { Collection vertices = region.getVertices(); Collection triangles = region.getTriangles(); - - player.dispatchCUIEvent(new SelectionShapeEvent(getTypeID())); - + Map vertexIds = new HashMap(vertices.size()); int lastVertexId = -1; for (Vector vertex : vertices) { @@ -212,8 +210,6 @@ public class ConvexPolyhedralRegionSelector implements RegionSelector, CUIRegion if (isDefined()) { session.dispatchCUIEvent(player, new SelectionPointEvent(0, region.getMinimumPoint(), getArea())); session.dispatchCUIEvent(player, new SelectionPointEvent(1, region.getMaximumPoint(), getArea())); - } else { - session.dispatchCUIEvent(player, new SelectionShapeEvent(getLegacyTypeID())); } } } diff --git a/src/main/java/com/sk89q/worldedit/regions/CylinderRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/CylinderRegionSelector.java index 54585f708..f33937240 100644 --- a/src/main/java/com/sk89q/worldedit/regions/CylinderRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/CylinderRegionSelector.java @@ -199,8 +199,6 @@ public class CylinderRegionSelector implements RegionSelector, CUIRegion { if (isDefined()) { session.dispatchCUIEvent(player, new SelectionPointEvent(0, region.getMinimumPoint(), getArea())); session.dispatchCUIEvent(player, new SelectionPointEvent(1, region.getMaximumPoint(), getArea())); - } else { - session.dispatchCUIEvent(player, new SelectionShapeEvent(getLegacyTypeID())); } }