diff --git a/Client/src/main/java/com/baseband/client/feature/world/Select.java b/Client/src/main/java/com/baseband/client/feature/world/Select.java index 32f6aea..cfaa353 100644 --- a/Client/src/main/java/com/baseband/client/feature/world/Select.java +++ b/Client/src/main/java/com/baseband/client/feature/world/Select.java @@ -15,19 +15,17 @@ public class Select extends Feature { public static Selection selection; public static void select(BlockPos b) { - if(begin != null) { - end = b; - BaseBand.notify("Position 2: " + b.getX() + " " + b.getY() + " " + b.getZ()); - BaseBand.publish(new SelectEvent(new Selection(begin, end))); - return; - } - else { + if(end != null || begin == null) { begin = b; end = null; BaseBand.notify("Selection reset."); BaseBand.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ()); BaseBand.publish(new SelectEvent(null)); + return; } + end = b; + BaseBand.notify("Position 2: " + b.getX() + " " + b.getY() + " " + b.getZ()); + BaseBand.publish(new SelectEvent(new Selection(begin, end))); } @Priority(Integer.MAX_VALUE)