mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Added history size configuration option.
This commit is contained in:
parent
5254986da2
commit
0f46fb957f
@ -50,6 +50,9 @@ scripting:
|
||||
saving:
|
||||
dir: schematics
|
||||
|
||||
history:
|
||||
size: 15
|
||||
|
||||
wand-item: 271
|
||||
shell-save-type:
|
||||
no-double-slash: false
|
||||
|
@ -47,7 +47,7 @@ public class LocalSession {
|
||||
THRU
|
||||
}
|
||||
|
||||
public static final int MAX_HISTORY_SIZE = 15;
|
||||
public static int MAX_HISTORY_SIZE = 15;
|
||||
|
||||
private LocalConfiguration config;
|
||||
|
||||
|
@ -27,6 +27,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.LogFormat;
|
||||
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));
|
||||
|
||||
LocalSession.MAX_HISTORY_SIZE = Math.max(15, config.getInt("history.size", 15));
|
||||
|
||||
String snapshotsDir = config.getString("snapshots.directory", "");
|
||||
if (!snapshotsDir.trim().equals("")) {
|
||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||
|
@ -25,6 +25,7 @@ import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import com.sk89q.util.StringUtil;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.snapshots.SnapshotRepository;
|
||||
|
||||
/**
|
||||
@ -89,6 +90,8 @@ public class PropertiesConfiguration extends LocalConfiguration {
|
||||
navigationWandMaxDistance = getInt("nav-wand-distance", navigationWandMaxDistance);
|
||||
scriptTimeout = getInt("scripting-timeout", scriptTimeout);
|
||||
|
||||
LocalSession.MAX_HISTORY_SIZE = Math.max(15, getInt("history-size", 15));
|
||||
|
||||
String snapshotsDir = getString("snapshots-dir", "");
|
||||
if (!snapshotsDir.trim().equals("")) {
|
||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||
|
Loading…
Reference in New Issue
Block a user