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
This commit is contained in:
Wizjany
2012-12-24 01:01:01 -05:00
parent 24662d6365
commit e4771416aa
7 changed files with 21 additions and 7 deletions

View File

@ -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] + "'");