Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Added history size configuration option.
Dieser Commit ist enthalten in:
Ursprung
5254986da2
Commit
0f46fb957f
@ -50,6 +50,9 @@ scripting:
|
|||||||
saving:
|
saving:
|
||||||
dir: schematics
|
dir: schematics
|
||||||
|
|
||||||
|
history:
|
||||||
|
size: 15
|
||||||
|
|
||||||
wand-item: 271
|
wand-item: 271
|
||||||
shell-save-type:
|
shell-save-type:
|
||||||
no-double-slash: false
|
no-double-slash: false
|
||||||
|
@ -47,7 +47,7 @@ public class LocalSession {
|
|||||||
THRU
|
THRU
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int MAX_HISTORY_SIZE = 15;
|
public static int MAX_HISTORY_SIZE = 15;
|
||||||
|
|
||||||
private LocalConfiguration config;
|
private LocalConfiguration config;
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.util.config.Configuration;
|
import org.bukkit.util.config.Configuration;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.LogFormat;
|
import com.sk89q.worldedit.LogFormat;
|
||||||
import com.sk89q.worldedit.snapshots.SnapshotRepository;
|
import com.sk89q.worldedit.snapshots.SnapshotRepository;
|
||||||
|
|
||||||
@ -76,6 +77,8 @@ public class BukkitConfiguration extends LocalConfiguration {
|
|||||||
|
|
||||||
allowedDataCycleBlocks = new HashSet<Integer>(config.getIntList("limits.allowed-data-cycle-blocks", null));
|
allowedDataCycleBlocks = new HashSet<Integer>(config.getIntList("limits.allowed-data-cycle-blocks", null));
|
||||||
|
|
||||||
|
LocalSession.MAX_HISTORY_SIZE = Math.max(15, config.getInt("history.size", 15));
|
||||||
|
|
||||||
String snapshotsDir = config.getString("snapshots.directory", "");
|
String snapshotsDir = config.getString("snapshots.directory", "");
|
||||||
if (!snapshotsDir.trim().equals("")) {
|
if (!snapshotsDir.trim().equals("")) {
|
||||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||||
|
@ -25,6 +25,7 @@ import java.util.Properties;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import com.sk89q.util.StringUtil;
|
import com.sk89q.util.StringUtil;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.snapshots.SnapshotRepository;
|
import com.sk89q.worldedit.snapshots.SnapshotRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,6 +90,8 @@ public class PropertiesConfiguration extends LocalConfiguration {
|
|||||||
navigationWandMaxDistance = getInt("nav-wand-distance", navigationWandMaxDistance);
|
navigationWandMaxDistance = getInt("nav-wand-distance", navigationWandMaxDistance);
|
||||||
scriptTimeout = getInt("scripting-timeout", scriptTimeout);
|
scriptTimeout = getInt("scripting-timeout", scriptTimeout);
|
||||||
|
|
||||||
|
LocalSession.MAX_HISTORY_SIZE = Math.max(15, getInt("history-size", 15));
|
||||||
|
|
||||||
String snapshotsDir = getString("snapshots-dir", "");
|
String snapshotsDir = getString("snapshots-dir", "");
|
||||||
if (!snapshotsDir.trim().equals("")) {
|
if (!snapshotsDir.trim().equals("")) {
|
||||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren