mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
fix: take confirm-large from default limit for unlimited, add option to override (#2782)
- fixes #2706
This commit is contained in:
parent
eaeb3a633a
commit
d69dc97958
@ -2,6 +2,7 @@ package com.fastasyncworldedit.core;
|
|||||||
|
|
||||||
import com.fastasyncworldedit.core.configuration.Settings;
|
import com.fastasyncworldedit.core.configuration.Settings;
|
||||||
import com.fastasyncworldedit.core.internal.exception.FaweException;
|
import com.fastasyncworldedit.core.internal.exception.FaweException;
|
||||||
|
import com.fastasyncworldedit.core.limit.FaweLimit;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
||||||
import com.fastasyncworldedit.core.util.CachedTextureUtil;
|
import com.fastasyncworldedit.core.util.CachedTextureUtil;
|
||||||
import com.fastasyncworldedit.core.util.CleanTextureUtil;
|
import com.fastasyncworldedit.core.util.CleanTextureUtil;
|
||||||
@ -105,6 +106,8 @@ public class Fawe {
|
|||||||
* Implementation dependent stuff
|
* Implementation dependent stuff
|
||||||
*/
|
*/
|
||||||
this.setupConfigs();
|
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.IMP = this.implementation.getTaskManager();
|
||||||
|
|
||||||
TaskManager.taskManager().async(() -> {
|
TaskManager.taskManager().async(() -> {
|
||||||
|
@ -791,6 +791,11 @@ public class Settings extends Config {
|
|||||||
})
|
})
|
||||||
public boolean UNSTUCK_ON_GENERATE = true;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.fastasyncworldedit.core.limit;
|
package com.fastasyncworldedit.core.limit;
|
||||||
|
|
||||||
import com.fastasyncworldedit.core.FaweCache;
|
import com.fastasyncworldedit.core.FaweCache;
|
||||||
|
import com.fastasyncworldedit.core.configuration.Settings;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -121,7 +122,8 @@ public class FaweLimit {
|
|||||||
MAX.SCHEM_FILE_SIZE_LIMIT = Integer.MAX_VALUE;
|
MAX.SCHEM_FILE_SIZE_LIMIT = Integer.MAX_VALUE;
|
||||||
MAX.MAX_EXPRESSION_MS = 50;
|
MAX.MAX_EXPRESSION_MS = 50;
|
||||||
MAX.FAST_PLACEMENT = true;
|
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.RESTRICT_HISTORY_TO_REGIONS = false;
|
||||||
MAX.STRIP_NBT = Collections.emptySet();
|
MAX.STRIP_NBT = Collections.emptySet();
|
||||||
MAX.UNIVERSAL_DISALLOWED_BLOCKS = false;
|
MAX.UNIVERSAL_DISALLOWED_BLOCKS = false;
|
||||||
|
@ -22,6 +22,8 @@ package com.sk89q.worldedit.command;
|
|||||||
import com.fastasyncworldedit.core.Fawe;
|
import com.fastasyncworldedit.core.Fawe;
|
||||||
import com.fastasyncworldedit.core.FaweVersion;
|
import com.fastasyncworldedit.core.FaweVersion;
|
||||||
import com.fastasyncworldedit.core.configuration.Caption;
|
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.fastasyncworldedit.core.util.UpdateNotification;
|
||||||
import com.intellectualsites.paster.IncendoPaster;
|
import com.intellectualsites.paster.IncendoPaster;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
@ -97,6 +99,8 @@ public class WorldEditCommands {
|
|||||||
.getConfiguration()));
|
.getConfiguration()));
|
||||||
//FAWE start
|
//FAWE start
|
||||||
Fawe.instance().setupConfigs();
|
Fawe.instance().setupConfigs();
|
||||||
|
FaweLimit.MAX.CONFIRM_LARGE =
|
||||||
|
Settings.settings().LIMITS.get("default").CONFIRM_LARGE || Settings.settings().GENERAL.LIMIT_UNLIMITED_CONFIRMS;
|
||||||
//FAWE end
|
//FAWE end
|
||||||
actor.print(Caption.of("worldedit.reload.config"));
|
actor.print(Caption.of("worldedit.reload.config"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user