Fix default value issue when using PACKETS (#1192)

This commit is contained in:
Diego Arias 2019-04-03 16:39:34 -03:00 committed by Trent Hensler
parent 1f1ef59637
commit 126cda05e5

View File

@ -47,6 +47,12 @@ public class PacketParticleProvider implements ParticleProvider<ParticleEffect>
@Override
public ParticleEffect effectFromString(String string) {
for (ParticleEffect effect : ParticleEffect.values()) {
if (effect.name().equalsIgnoreCase(string)) {
return effect;
}
}
// If none of the Enum name matches fallback to the other names
return ParticleEffect.fromName(string);
}