diff --git a/src/com/cnaude/chairs/Chairs.java b/src/com/cnaude/chairs/Chairs.java index 9a9b423..691120a 100644 --- a/src/com/cnaude/chairs/Chairs.java +++ b/src/com/cnaude/chairs/Chairs.java @@ -45,7 +45,11 @@ public class Chairs extends JavaPlugin { { return psitdata; } - protected Class vehiclearrowclass; + private Class vehiclearrowclass; + protected Class getVehicleArrowClass() + { + return vehiclearrowclass; + } @Override public void onEnable() { diff --git a/src/com/cnaude/chairs/PlayerSitData.java b/src/com/cnaude/chairs/PlayerSitData.java index c6a9512..4ba52b8 100644 --- a/src/com/cnaude/chairs/PlayerSitData.java +++ b/src/com/cnaude/chairs/PlayerSitData.java @@ -98,7 +98,7 @@ public class PlayerSitData { Object nmsarrow = getHandleMethod.invoke(arrow); Field bukkitEntityField = nmsarrow.getClass().getSuperclass().getDeclaredField("bukkitEntity"); bukkitEntityField.setAccessible(true); - Constructor ctor = plugin.vehiclearrowclass.getDeclaredConstructor(Bukkit.getServer().getClass(), nmsarrow.getClass()); + Constructor ctor = plugin.getVehicleArrowClass().getDeclaredConstructor(Bukkit.getServer().getClass(), nmsarrow.getClass()); ctor.setAccessible(true); Object vehiclearrow = ctor.newInstance(Bukkit.getServer(), nmsarrow); bukkitEntityField.set(nmsarrow, vehiclearrow);