2011-01-02 05:50:31 +00:00
|
|
|
// $Id$
|
|
|
|
/*
|
|
|
|
* WorldEdit
|
|
|
|
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.sk89q.worldedit;
|
|
|
|
|
2011-01-27 09:51:34 +00:00
|
|
|
import java.io.File;
|
2011-01-22 21:34:05 +00:00
|
|
|
import java.util.HashSet;
|
2011-01-02 05:50:31 +00:00
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
import com.sk89q.worldedit.snapshots.SnapshotRepository;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents WorldEdit's configuration.
|
|
|
|
*
|
|
|
|
* @author sk89q
|
|
|
|
*/
|
|
|
|
public abstract class LocalConfiguration {
|
|
|
|
protected static final int[] defaultDisallowedBlocks = new int[] {
|
|
|
|
6, 7, 14, 15, 16, 21, 22, 23, 24, 25, 26, 27, 28, 29, 39, 31,
|
|
|
|
32, 33, 34, 36, 37, 38, 39, 40, 46, 50, 51, 56, 59, 69, 73, 74,
|
|
|
|
75, 76, 77, 81, 83
|
|
|
|
};
|
|
|
|
|
|
|
|
public boolean profile = false;
|
2011-01-22 21:34:05 +00:00
|
|
|
public Set<Integer> disallowedBlocks = new HashSet<Integer>();
|
2011-01-02 05:50:31 +00:00
|
|
|
public int defaultChangeLimit = -1;
|
|
|
|
public int maxChangeLimit = -1;
|
2011-01-27 17:07:50 +00:00
|
|
|
public String shellSaveType = "";
|
2011-01-02 05:50:31 +00:00
|
|
|
public SnapshotRepository snapshotRepo = null;
|
|
|
|
public int maxRadius = -1;
|
|
|
|
public int maxSuperPickaxeSize = 5;
|
2011-01-09 19:14:55 +00:00
|
|
|
public int maxBrushRadius = 6;
|
2011-01-27 17:07:50 +00:00
|
|
|
public boolean logCommands = false;
|
2011-01-02 05:50:31 +00:00
|
|
|
public boolean registerHelp = true;
|
|
|
|
public int wandItem = 271;
|
|
|
|
public boolean superPickaxeDrop = true;
|
|
|
|
public boolean superPickaxeManyDrop = true;
|
|
|
|
public boolean noDoubleSlash = false;
|
|
|
|
public boolean useInventory = false;
|
|
|
|
public boolean useInventoryOverride = false;
|
2011-01-19 10:43:26 +00:00
|
|
|
public int navigationWand = 345;
|
|
|
|
public int navigationWandMaxDistance = 50;
|
2011-01-22 21:34:05 +00:00
|
|
|
public int scriptTimeout = 3000;
|
2011-01-30 06:07:56 +00:00
|
|
|
public Set<Integer> allowedDataCycleBlocks = new HashSet<Integer>();
|
2011-01-29 18:14:04 +00:00
|
|
|
public String saveDir = "schematics";
|
|
|
|
public String scriptsDir = "craftscripts";
|
2011-01-02 05:50:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Loads the configuration.
|
|
|
|
*/
|
|
|
|
public abstract void load();
|
2011-01-27 09:51:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the working directory to work from.
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public File getWorkingDirectory() {
|
|
|
|
return new File(".");
|
|
|
|
}
|
2011-01-02 05:50:31 +00:00
|
|
|
}
|