mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 02:47:11 +00:00
Handle empty damage values in WorldEdit.getBlock(). Fixes #921
This commit is contained in:
parent
204b36edd3
commit
79f2d68e60
@ -340,7 +340,7 @@ public class WorldEdit {
|
||||
if (data == -1) { // Block data not yet detected
|
||||
// Parse the block data (optional)
|
||||
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))) {
|
||||
data = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user