Ignore invalid properties

Dieser Commit ist enthalten in:
Jesse Boyd 2018-08-14 20:57:32 +10:00
Ursprung ced4fed9db
Commit db65e96700
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -19,6 +19,7 @@
package com.sk89q.worldedit.world.block;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.object.string.MutableCharSequence;
import com.google.common.base.Function;
import com.google.common.collect.Maps;
@ -132,9 +133,13 @@ public class BlockState implements BlockStateHolder<BlockState> {
switch (c) {
case ']':
case ',': {
charSequence.setSubstring(last, i);
int index = property.getIndexFor(charSequence);
stateId = property.modifyIndex(stateId, index);
if (property != null) {
charSequence.setSubstring(last, i);
int index = property.getIndexFor(charSequence);
stateId = property.modifyIndex(stateId, index);
} else {
Fawe.debug("Invalid property " + type + " | " + charSequence);
}
last = i + 1;
break;
}