Dieser Commit ist enthalten in:
dordsor21 2021-09-10 17:46:21 +01:00
Ursprung 829ddc393f
Commit 470ba64fe4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
3 geänderte Dateien mit 41 neuen und 29 gelöschten Zeilen

Datei anzeigen

@ -838,6 +838,17 @@ public class LocalSession implements TextureHolder {
} }
setClipboard(multi); setClipboard(multi);
} }
/**
* Ensure the player's clipboard is closed. (will only do something with clipboard-on-disk)
*/
public void closeClipboard() {
synchronized (clipboardLock) {
if (this.clipboard != null) {
this.clipboard.close();
}
}
}
//FAWE end //FAWE end
/** /**

Datei anzeigen

@ -139,7 +139,7 @@ public class ClipboardCommands {
} }
session.setClipboard(null); session.setClipboard(null);
Clipboard clipboard = new BlockArrayClipboard(region, actor.getUniqueId()); try (Clipboard clipboard = new BlockArrayClipboard(region, actor.getUniqueId())) {
clipboard.setOrigin(centerClipboard ? region.getCenter().toBlockPoint() : session.getPlacementPosition(actor)); clipboard.setOrigin(centerClipboard ? region.getCenter().toBlockPoint() : session.getPlacementPosition(actor));
ForwardExtentCopy copy = new ForwardExtentCopy(editSession, region, clipboard, region.getMinimumPoint()); ForwardExtentCopy copy = new ForwardExtentCopy(editSession, region, clipboard, region.getMinimumPoint());
@ -170,6 +170,7 @@ public class ClipboardCommands {
session.setClipboard(new ClipboardHolder(clipboard)); session.setClipboard(new ClipboardHolder(clipboard));
copy.getStatusMessages().forEach(actor::print); copy.getStatusMessages().forEach(actor::print);
}
//FAWE end //FAWE end
} }

Datei anzeigen

@ -391,7 +391,7 @@ public interface Player extends Entity, Actor {
*/ */
default void unregister() { default void unregister() {
cancel(true); cancel(true);
getSession().setClipboard(null); getSession().closeClipboard();
if (Settings.IMP.HISTORY.DELETE_ON_LOGOUT) { if (Settings.IMP.HISTORY.DELETE_ON_LOGOUT) {
getSession().clearHistory(); getSession().clearHistory();
} }