fix Select

This commit is contained in:
Daniella / Tove 2024-05-31 20:23:34 +02:00
parent c6ede88e1d
commit a7ea1934a3
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 4 additions and 2 deletions

View file

@ -16,6 +16,8 @@ public class SelectEvent extends RemoteEvent {
}
public Selection getMySelection() {
if(selection == null)
return null;
if(BaseBand.remoteEventManager.isConnected()) {
RemoteEventManager manager = BaseBand.remoteEventManager;
Selection[] splitSelection = BlockUtils.splitSelection1D(selection, manager.getPeers());

View file

@ -21,12 +21,12 @@ public class Select extends Feature {
BaseBand.publish(new SelectEvent(new Selection(begin, end)));
return;
}
if(end != null) {
else {
begin = b;
end = null;
BaseBand.notify("Selection reset.");
BaseBand.notify("Position 1: " + b.getX() + " " + b.getY() + " " + b.getZ());
BaseBand.publish(new SelectEvent(null));
return;
}
}