mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 02:58:03 +01:00
Fix Spawns / Jail loading
This commit is contained in:
parent
f9bcc3100c
commit
c028c385b6
@ -13,22 +13,22 @@ import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPluginLoader;
|
||||
import org.yaml.snakeyaml.TypeDescription;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
import org.yaml.snakeyaml.introspector.Property;
|
||||
import org.yaml.snakeyaml.nodes.*;
|
||||
|
||||
|
||||
public class BukkitConstructor extends Constructor
|
||||
public class BukkitConstructor extends CustomClassLoaderConstructor
|
||||
{
|
||||
private final transient Pattern NUMPATTERN = Pattern.compile("\\d+");
|
||||
private final transient Plugin plugin;
|
||||
|
||||
public BukkitConstructor(final Class clazz, final Plugin plugin)
|
||||
{
|
||||
super(clazz);
|
||||
super(clazz, plugin.getClass().getClassLoader());
|
||||
this.plugin = plugin;
|
||||
yamlClassConstructors.put(NodeId.scalar, new ConstructBukkitScalar());
|
||||
yamlClassConstructors.put(NodeId.mapping, new ConstructBukkitMapping());
|
||||
@ -276,6 +276,7 @@ public class BukkitConstructor extends Constructor
|
||||
return super.construct(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object constructJavaBean2ndStep(final MappingNode node, final Object object)
|
||||
{
|
||||
Map<Class<? extends Object>, TypeDescription> typeDefinitions;
|
||||
|
Loading…
Reference in New Issue
Block a user