mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-04 07:28:17 +01:00
Fix rollback
This commit is contained in:
parent
0d7c0474cc
commit
598928053d
@ -45,7 +45,7 @@ public class Rollback extends FaweCommand {
|
||||
}
|
||||
player.deleteMeta("rollback");
|
||||
final FaweLocation origin = player.getLocation();
|
||||
rollback(player, true, Arrays.copyOfRange(args, 1, args.length), new RunnableVal<List<DiskStorageHistory>>() {
|
||||
rollback(player, !player.hasPermission("fawe.rollback.deep"), Arrays.copyOfRange(args, 1, args.length), new RunnableVal<List<DiskStorageHistory>>() {
|
||||
@Override
|
||||
public void run(List<DiskStorageHistory> edits) {
|
||||
long total = 0;
|
||||
|
@ -271,6 +271,7 @@ public class DiskStorageHistory extends FaweStreamChangeSet {
|
||||
if (summary != null) {
|
||||
return summary;
|
||||
}
|
||||
try {
|
||||
if (bdFile.exists()) {
|
||||
int ox = getOriginX();
|
||||
int oz = getOriginZ();
|
||||
@ -293,8 +294,8 @@ public class DiskStorageHistory extends FaweStreamChangeSet {
|
||||
}
|
||||
byte[] buffer = new byte[9];
|
||||
int i = 0;
|
||||
while (!shallow && i < Settings.BUFFER_SIZE) {
|
||||
i++;
|
||||
int amount = (Settings.BUFFER_SIZE - HEADER_SIZE) / 9;
|
||||
while (!shallow && ++i < amount) {
|
||||
if (gis.read(buffer) == -1) {
|
||||
fis.close();
|
||||
gis.close();
|
||||
@ -310,6 +311,9 @@ public class DiskStorageHistory extends FaweStreamChangeSet {
|
||||
MainUtil.handleError(e);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return summary;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user