mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 10:04:51 +02:00
@@ -210,7 +210,8 @@ public class BukkitConstructor extends Constructor
|
|||||||
}
|
}
|
||||||
return new EnchantmentLevel(enchant, level);
|
return new EnchantmentLevel(enchant, level);
|
||||||
}
|
}
|
||||||
if (node.getType().isEnum()) {
|
if (node.getType().isEnum())
|
||||||
|
{
|
||||||
final String val = (String)constructScalar((ScalarNode)node);
|
final String val = (String)constructScalar((ScalarNode)node);
|
||||||
if (val.isEmpty())
|
if (val.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -218,7 +219,8 @@ public class BukkitConstructor extends Constructor
|
|||||||
}
|
}
|
||||||
for (Object object : node.getType().getEnumConstants())
|
for (Object object : node.getType().getEnumConstants())
|
||||||
{
|
{
|
||||||
if (object.toString().equalsIgnoreCase(val)) {
|
if (object.toString().equalsIgnoreCase(val))
|
||||||
|
{
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -292,7 +294,8 @@ public class BukkitConstructor extends Constructor
|
|||||||
final Field typeDefField = Constructor.class.getDeclaredField("typeDefinitions");
|
final Field typeDefField = Constructor.class.getDeclaredField("typeDefinitions");
|
||||||
typeDefField.setAccessible(true);
|
typeDefField.setAccessible(true);
|
||||||
typeDefinitions = (Map<Class<? extends Object>, TypeDescription>)typeDefField.get((Constructor)BukkitConstructor.this);
|
typeDefinitions = (Map<Class<? extends Object>, TypeDescription>)typeDefField.get((Constructor)BukkitConstructor.this);
|
||||||
if (typeDefinitions == null) {
|
if (typeDefinitions == null)
|
||||||
|
{
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user