mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-06 08:28:14 +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");
|
player.deleteMeta("rollback");
|
||||||
final FaweLocation origin = player.getLocation();
|
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
|
@Override
|
||||||
public void run(List<DiskStorageHistory> edits) {
|
public void run(List<DiskStorageHistory> edits) {
|
||||||
long total = 0;
|
long total = 0;
|
||||||
|
@ -271,6 +271,7 @@ public class DiskStorageHistory extends FaweStreamChangeSet {
|
|||||||
if (summary != null) {
|
if (summary != null) {
|
||||||
return summary;
|
return summary;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
if (bdFile.exists()) {
|
if (bdFile.exists()) {
|
||||||
int ox = getOriginX();
|
int ox = getOriginX();
|
||||||
int oz = getOriginZ();
|
int oz = getOriginZ();
|
||||||
@ -293,8 +294,8 @@ public class DiskStorageHistory extends FaweStreamChangeSet {
|
|||||||
}
|
}
|
||||||
byte[] buffer = new byte[9];
|
byte[] buffer = new byte[9];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (!shallow && i < Settings.BUFFER_SIZE) {
|
int amount = (Settings.BUFFER_SIZE - HEADER_SIZE) / 9;
|
||||||
i++;
|
while (!shallow && ++i < amount) {
|
||||||
if (gis.read(buffer) == -1) {
|
if (gis.read(buffer) == -1) {
|
||||||
fis.close();
|
fis.close();
|
||||||
gis.close();
|
gis.close();
|
||||||
@ -310,6 +311,9 @@ public class DiskStorageHistory extends FaweStreamChangeSet {
|
|||||||
MainUtil.handleError(e);
|
MainUtil.handleError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return summary;
|
return summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user