Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Added new items for 1.4.6
Fix permission for other help command (why are there two?) - Made registerhelp read from yaml (not that the setting does anything) Added an option to override data value limits. - This should fix some mods which use data values above 16 - May cause issues if set to true and people mess with vanilla data values
Dieser Commit ist enthalten in:
Ursprung
24662d6365
Commit
e4771416aa
@ -90,7 +90,7 @@ public abstract class LocalConfiguration {
|
||||
public int maxSuperPickaxeSize = 5;
|
||||
public int maxBrushRadius = 6;
|
||||
public boolean logCommands = false;
|
||||
public boolean registerHelp = true;
|
||||
public boolean registerHelp = true; // what is the point of this, it's not even used
|
||||
public int wandItem = ItemID.WOOD_AXE;
|
||||
public boolean superPickaxeDrop = true;
|
||||
public boolean superPickaxeManyDrop = true;
|
||||
@ -106,6 +106,7 @@ public abstract class LocalConfiguration {
|
||||
public boolean showFirstUseVersion = true;
|
||||
public int butcherDefaultRadius = -1;
|
||||
public int butcherMaxRadius = -1;
|
||||
public boolean allowExtraDataValues = false;
|
||||
|
||||
/**
|
||||
* Loads the configuration.
|
||||
|
@ -418,7 +418,7 @@ public class WorldEdit {
|
||||
// Parse the block data (optional)
|
||||
try {
|
||||
data = (typeAndData.length > 1 && typeAndData[1].length() > 0) ? Integer.parseInt(typeAndData[1]) : (allowNoData ? -1 : 0);
|
||||
if (data > 15 || (data < 0 && !(allAllowed && data == -1))) {
|
||||
if ((data > 15 && !config.allowExtraDataValues) || (data < 0 && !(allAllowed && data == -1))) {
|
||||
data = 0;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
@ -443,15 +443,12 @@ public class WorldEdit {
|
||||
case STONE:
|
||||
data = 0;
|
||||
break;
|
||||
|
||||
case SANDSTONE:
|
||||
data = 1;
|
||||
break;
|
||||
|
||||
case WOOD:
|
||||
data = 2;
|
||||
break;
|
||||
|
||||
case COBBLESTONE:
|
||||
data = 3;
|
||||
break;
|
||||
@ -460,6 +457,10 @@ public class WorldEdit {
|
||||
break;
|
||||
case STONE_BRICK:
|
||||
data = 5;
|
||||
break;
|
||||
case NETHER_BRICK:
|
||||
data = 6;
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new InvalidItemException(arg, "Invalid step type '" + typeAndData[1] + "'");
|
||||
|
@ -170,6 +170,9 @@ public final class ItemID {
|
||||
public static final int CARROT_ON_A_STICK = 398;
|
||||
public static final int NETHER_STAR = 399;
|
||||
public static final int PUMPKIN_PIE = 400;
|
||||
public static final int FIREWORK_ROCKET = 401;
|
||||
public static final int FIREWORK_STAR = 402;
|
||||
public static final int ENCHANTED_BOOK = 403;
|
||||
|
||||
@Deprecated public static final int GOLD_RECORD = 2256; // deprecated, but leave it there
|
||||
@Deprecated public static final int GREEN_RECORD = 2257; // deprecated, but leave it there
|
||||
|
@ -328,6 +328,9 @@ public enum ItemType {
|
||||
CARROT_ON_A_STICK(ItemID.CARROT_ON_A_STICK, "Carrot on a stick", "carrotonastick", "carrotonstick", "stickcarrot", "carrotstick"),
|
||||
NETHER_STAR(ItemID.NETHER_STAR, "Nether star", "netherstar", "starnether"),
|
||||
PUMPKIN_PIE(ItemID.PUMPKIN_PIE, "Pumpkin pie", "pumpkinpie"),
|
||||
FIREWORK_ROCKET(ItemID.FIREWORK_ROCKET, "Firework rocket", "firework", "rocket"),
|
||||
FIREWORK_STAR(ItemID.FIREWORK_STAR, "Firework star", "fireworkstar", "fireworkcharge"),
|
||||
ENCHANTED_BOOK(ItemID.ENCHANTED_BOOK, "Enchanted book", "enchantedbook", "spellbook", "enchantedtome", "tome"),
|
||||
DISC_13(ItemID.DISC_13, "Music Disc - 13", "disc_13"),
|
||||
DISC_CAT(ItemID.DISC_CAT, "Music Disc - Cat", "disc_cat"),
|
||||
DISC_BLOCKS(ItemID.DISC_BLOCKS, "Music Disc - blocks", "disc_blocks"),
|
||||
@ -553,6 +556,9 @@ public enum ItemType {
|
||||
shouldNotStack.add(ItemID.MAP);
|
||||
shouldNotStack.add(ItemID.SHEARS);
|
||||
shouldNotStack.add(ItemID.HEAD);
|
||||
shouldNotStack.add(ItemID.FIREWORK_ROCKET);
|
||||
shouldNotStack.add(ItemID.FIREWORK_STAR);
|
||||
shouldNotStack.add(ItemID.ENCHANTED_BOOK);
|
||||
shouldNotStack.add(ItemID.DISC_13);
|
||||
shouldNotStack.add(ItemID.DISC_CAT);
|
||||
shouldNotStack.add(ItemID.DISC_BLOCKS);
|
||||
|
@ -434,7 +434,7 @@ public class BukkitWorld extends LocalWorld {
|
||||
* Gets the single block inventory for a potentially double chest.
|
||||
* Handles people who have an old version of Bukkit.
|
||||
* This should be replaced with {@link org.bukkit.block.Chest#getBlockInventory()}
|
||||
* in a few months (now = March 2012)
|
||||
* in a few months (now = March 2012) // note from future dev - lol
|
||||
*
|
||||
* @param chest The chest to get a single block inventory for
|
||||
* @return The chest's inventory
|
||||
|
@ -497,6 +497,7 @@ public class UtilityCommands {
|
||||
max = -1
|
||||
)
|
||||
@Console
|
||||
@CommandPermissions("worldedit.help")
|
||||
public void help(CommandContext args, LocalSession session, LocalPlayer player,
|
||||
EditSession editSession) throws WorldEditException {
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class YAMLConfiguration extends LocalConfiguration {
|
||||
"limits.max-super-pickaxe-size", maxSuperPickaxeSize));
|
||||
butcherDefaultRadius = Math.max(-1, config.getInt("limits.butcher-radius.default", butcherDefaultRadius));
|
||||
butcherMaxRadius = Math.max(-1, config.getInt("limits.butcher-radius.maximum", butcherMaxRadius));
|
||||
registerHelp = true;
|
||||
registerHelp = config.getBoolean("register-help");
|
||||
logCommands = config.getBoolean("logging.log-commands", logCommands);
|
||||
superPickaxeDrop = config.getBoolean("super-pickaxe.drop-items",
|
||||
superPickaxeDrop);
|
||||
@ -97,6 +97,8 @@ public class YAMLConfiguration extends LocalConfiguration {
|
||||
|
||||
allowedDataCycleBlocks = new HashSet<Integer>(config.getIntList("limits.allowed-data-cycle-blocks", null));
|
||||
|
||||
allowExtraDataValues = config.getBoolean("limits.allow-extra-data-values", false);
|
||||
|
||||
LocalSession.MAX_HISTORY_SIZE = Math.max(0, config.getInt("history.size", 15));
|
||||
LocalSession.EXPIRATION_GRACE = config.getInt("history.expiration", 10) * 60 * 1000;
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren