3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 10:30:04 +01:00
Dieser Commit ist enthalten in:
dordsor21 2021-08-25 15:48:39 +01:00
Ursprung 29bebcd034
Commit 4050cf238f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -576,7 +576,10 @@ public class LocalSession implements TextureHolder {
public EditSession undo(@Nullable BlockBag newBlockBag, Actor actor) {
checkNotNull(actor);
//FAWE start - use our logic
World world = ((Player) actor).getWorldForEditing();
World world = (actor instanceof Player) ? ((Player) actor).getWorldForEditing() : getWorldOverride();
if (world == null) {
throw new MissingWorldException();
}
loadSessionHistoryFromDisk(actor.getUniqueId(), world);
if (getHistoryNegativeIndex() < history.size()) {
ChangeSet changeSet = getChangeSet(history.get(getHistoryIndex()));
@ -617,7 +620,10 @@ public class LocalSession implements TextureHolder {
//FAWE start - use our logic
public EditSession redo(@Nullable BlockBag newBlockBag, Actor actor) {
checkNotNull(actor);
World world = ((Player) actor).getWorldForEditing();
World world = (actor instanceof Player) ? ((Player) actor).getWorldForEditing() : getWorldOverride();
if (world == null) {
throw new MissingWorldException();
}
loadSessionHistoryFromDisk(actor.getUniqueId(), world);
if (getHistoryNegativeIndex() > 0) {
setDirty();