3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Handle empty damage values in WorldEdit.getBlock(). Fixes #921

Dieser Commit ist enthalten in:
zml2008 2012-03-20 17:30:57 -07:00
Ursprung 204b36edd3
Commit 79f2d68e60

Datei anzeigen

@ -340,7 +340,7 @@ public class WorldEdit {
if (data == -1) { // Block data not yet detected if (data == -1) { // Block data not yet detected
// Parse the block data (optional) // Parse the block data (optional)
try { try {
data = typeAndData.length > 1 ? Integer.parseInt(typeAndData[1]) : (allowNoData ? -1 : 0); 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 || (data < 0 && !(allAllowed && data == -1))) {
data = 0; data = 0;
} }