fix Select again
This commit is contained in:
parent
1775e4e00a
commit
8d7fbd0b53
1 changed files with 5 additions and 7 deletions
|
@ -15,19 +15,17 @@ public class Select extends Feature {
|
||||||
public static Selection selection;
|
public static Selection selection;
|
||||||
|
|
||||||
public static void select(BlockPos b) {
|
public static void select(BlockPos b) {
|
||||||
if(begin != null) {
|
if(end != null || begin == null) {
|
||||||
end = b;
|
|
||||||
BaseBand.notify("Position 2: " + b.getX() + " " + b.getY() + " " + b.getZ());
|
|
||||||
BaseBand.publish(new SelectEvent(new Selection(begin, end)));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
begin = b;
|
begin = b;
|
||||||
end = null;
|
end = null;
|
||||||
BaseBand.notify("Selection reset.");
|
BaseBand.notify("Selection reset.");
|
||||||
BaseBand.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ());
|
BaseBand.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ());
|
||||||
BaseBand.publish(new SelectEvent(null));
|
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)
|
@Priority(Integer.MAX_VALUE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue