mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:58:35 +00:00
Allow NBT stored in DiskOptimizedClipboards to be written to disk as a compressed byte array at the end of the file (#1745)
* Allow NBT stored in DiskOptimizedClipboards to be written to disk as a compressed byte array at the end of the file * Add some deprecations/javadocs and provide the expected clipboard version on error * Javadoc since tags and add location of clipboard folder to error * Refactor load-from-file method into DOC class * Refactor nbt loading code into separate method in DOC
This commit is contained in:
@ -470,13 +470,13 @@ public interface Player extends Entity, Actor {
|
||||
}
|
||||
} catch (EmptyClipboardException ignored) {
|
||||
}
|
||||
DiskOptimizedClipboard doc = new DiskOptimizedClipboard(file);
|
||||
DiskOptimizedClipboard doc = DiskOptimizedClipboard.loadFromFile(file);
|
||||
Clipboard clip = doc.toClipboard();
|
||||
ClipboardHolder holder = new ClipboardHolder(clip);
|
||||
session.setClipboard(holder);
|
||||
}
|
||||
} catch (FaweClipboardVersionMismatchException e) {
|
||||
print(Caption.of("fawe.error.clipboard.on.disk.version.mismatch"));
|
||||
print(e.getComponent());
|
||||
} catch (RuntimeException e) {
|
||||
print(Caption.of("fawe.error.clipboard.invalid"));
|
||||
e.printStackTrace();
|
||||
|
Reference in New Issue
Block a user