3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-07-03 09:18:03 +02:00

fix: take confirm-large from default limit for unlimited, add option to override (#2782)

- fixes #2706
Dieser Commit ist enthalten in:
Jordan 2024-06-20 18:24:41 +02:00 committet von GitHub
Ursprung eaeb3a633a
Commit d69dc97958
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
4 geänderte Dateien mit 15 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -2,6 +2,7 @@ package com.fastasyncworldedit.core;
import com.fastasyncworldedit.core.configuration.Settings;
import com.fastasyncworldedit.core.internal.exception.FaweException;
import com.fastasyncworldedit.core.limit.FaweLimit;
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
import com.fastasyncworldedit.core.util.CachedTextureUtil;
import com.fastasyncworldedit.core.util.CleanTextureUtil;
@ -105,6 +106,8 @@ public class Fawe {
* Implementation dependent stuff
*/
this.setupConfigs();
FaweLimit.MAX.CONFIRM_LARGE =
Settings.settings().LIMITS.get("default").CONFIRM_LARGE || Settings.settings().GENERAL.LIMIT_UNLIMITED_CONFIRMS;
TaskManager.IMP = this.implementation.getTaskManager();
TaskManager.taskManager().async(() -> {

Datei anzeigen

@ -791,6 +791,11 @@ public class Settings extends Config {
})
public boolean UNSTUCK_ON_GENERATE = true;
@Comment({
"If unlimited limits should still require /confirm on large. Defaults to limits.default.confirm-large otherwise."
})
public boolean LIMIT_UNLIMITED_CONFIRMS = true;
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package com.fastasyncworldedit.core.limit;
import com.fastasyncworldedit.core.FaweCache;
import com.fastasyncworldedit.core.configuration.Settings;
import java.util.Collections;
import java.util.Set;
@ -121,7 +122,8 @@ public class FaweLimit {
MAX.SCHEM_FILE_SIZE_LIMIT = Integer.MAX_VALUE;
MAX.MAX_EXPRESSION_MS = 50;
MAX.FAST_PLACEMENT = true;
MAX.CONFIRM_LARGE = true;
MAX.CONFIRM_LARGE =
Settings.settings().LIMITS.get("default").CONFIRM_LARGE || Settings.settings().GENERAL.LIMIT_UNLIMITED_CONFIRMS;
MAX.RESTRICT_HISTORY_TO_REGIONS = false;
MAX.STRIP_NBT = Collections.emptySet();
MAX.UNIVERSAL_DISALLOWED_BLOCKS = false;

Datei anzeigen

@ -22,6 +22,8 @@ package com.sk89q.worldedit.command;
import com.fastasyncworldedit.core.Fawe;
import com.fastasyncworldedit.core.FaweVersion;
import com.fastasyncworldedit.core.configuration.Caption;
import com.fastasyncworldedit.core.configuration.Settings;
import com.fastasyncworldedit.core.limit.FaweLimit;
import com.fastasyncworldedit.core.util.UpdateNotification;
import com.intellectualsites.paster.IncendoPaster;
import com.sk89q.worldedit.LocalSession;
@ -97,6 +99,8 @@ public class WorldEditCommands {
.getConfiguration()));
//FAWE start
Fawe.instance().setupConfigs();
FaweLimit.MAX.CONFIRM_LARGE =
Settings.settings().LIMITS.get("default").CONFIRM_LARGE || Settings.settings().GENERAL.LIMIT_UNLIMITED_CONFIRMS;
//FAWE end
actor.print(Caption.of("worldedit.reload.config"));
}