Use getter here
This commit is contained in:
parent
364d9dbaca
commit
9af92fa1e5
@ -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() {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user