Skip to content

Commit

Permalink
Re-send type id for cuboid CUI.
Browse files Browse the repository at this point in the history
Works like poly CUI now.

CUI in general needs to cleanup :\
  • Loading branch information
wizjany committed Jun 29, 2019
1 parent b5e895c commit fae44ff
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -26,6 +26,7 @@
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.internal.cui.CUIRegion;
import com.sk89q.worldedit.internal.cui.SelectionPointEvent;
import com.sk89q.worldedit.internal.cui.SelectionShapeEvent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
Expand Down Expand Up @@ -124,7 +125,7 @@ public void setWorld(@Nullable World world) {
public boolean selectPrimary(BlockVector3 position, SelectorLimits limits) {
checkNotNull(position);

if (position1 != null && position1.equals(position)) {
if (position.equals(position1)) {
return false;
}

Expand All @@ -137,7 +138,7 @@ public boolean selectPrimary(BlockVector3 position, SelectorLimits limits) {
public boolean selectSecondary(BlockVector3 position, SelectorLimits limits) {
checkNotNull(position);

if (position2 != null && position2.equals(position)) {
if (position.equals(position2)) {
return false;
}

Expand Down Expand Up @@ -181,6 +182,8 @@ public void explainRegionAdjust(Actor player, LocalSession session) {
checkNotNull(player);
checkNotNull(session);

session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));

if (position1 != null) {
session.dispatchCUIEvent(player, new SelectionPointEvent(0, position1, getArea()));
}
Expand Down

0 comments on commit fae44ff

Please sign in to comment.