Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 11:00:04 +01:00
Fix #1217
Dieser Commit ist enthalten in:
Ursprung
29bebcd034
Commit
4050cf238f
@ -576,7 +576,10 @@ public class LocalSession implements TextureHolder {
|
|||||||
public EditSession undo(@Nullable BlockBag newBlockBag, Actor actor) {
|
public EditSession undo(@Nullable BlockBag newBlockBag, Actor actor) {
|
||||||
checkNotNull(actor);
|
checkNotNull(actor);
|
||||||
//FAWE start - use our logic
|
//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);
|
loadSessionHistoryFromDisk(actor.getUniqueId(), world);
|
||||||
if (getHistoryNegativeIndex() < history.size()) {
|
if (getHistoryNegativeIndex() < history.size()) {
|
||||||
ChangeSet changeSet = getChangeSet(history.get(getHistoryIndex()));
|
ChangeSet changeSet = getChangeSet(history.get(getHistoryIndex()));
|
||||||
@ -617,7 +620,10 @@ public class LocalSession implements TextureHolder {
|
|||||||
//FAWE start - use our logic
|
//FAWE start - use our logic
|
||||||
public EditSession redo(@Nullable BlockBag newBlockBag, Actor actor) {
|
public EditSession redo(@Nullable BlockBag newBlockBag, Actor actor) {
|
||||||
checkNotNull(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);
|
loadSessionHistoryFromDisk(actor.getUniqueId(), world);
|
||||||
if (getHistoryNegativeIndex() > 0) {
|
if (getHistoryNegativeIndex() > 0) {
|
||||||
setDirty();
|
setDirty();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren