Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-07 00:22:51 +02:00
Simplify flushing of clipboards in ClipboardCommands
Dieser Commit ist enthalten in:
Ursprung
f641fc1716
Commit
3088b1245c
@ -169,7 +169,7 @@ public class ClipboardCommands {
|
|||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
saveDiskClipboard(clipboard);
|
clipboard.flush();
|
||||||
}
|
}
|
||||||
session.setClipboard(new ClipboardHolder(clipboard));
|
session.setClipboard(new ClipboardHolder(clipboard));
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ public class ClipboardCommands {
|
|||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
saveDiskClipboard(clipboard);
|
clipboard.flush();
|
||||||
}
|
}
|
||||||
session.setClipboard(new ClipboardHolder(clipboard));
|
session.setClipboard(new ClipboardHolder(clipboard));
|
||||||
|
|
||||||
@ -465,19 +465,6 @@ public class ClipboardCommands {
|
|||||||
actor.print(Caption.of("fawe.tips.tip.copypaste"));
|
actor.print(Caption.of("fawe.tips.tip.copypaste"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveDiskClipboard(Clipboard clipboard) {
|
|
||||||
DiskOptimizedClipboard c;
|
|
||||||
if (clipboard instanceof DiskOptimizedClipboard) {
|
|
||||||
c = (DiskOptimizedClipboard) clipboard;
|
|
||||||
} else if (clipboard instanceof BlockArrayClipboard
|
|
||||||
&& ((BlockArrayClipboard) clipboard).getParent() instanceof DiskOptimizedClipboard) {
|
|
||||||
c = (DiskOptimizedClipboard) ((BlockArrayClipboard) clipboard).getParent();
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
c.flush();
|
|
||||||
}
|
|
||||||
//FAWE end
|
//FAWE end
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren