fix Select again

This commit is contained in:
Daniella / Tove 2024-05-31 20:26:52 +02:00
parent 1775e4e00a
commit 8d7fbd0b53
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -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)