Spawn arrow with zero velocity

This commit is contained in:
Shevchik 2013-12-21 19:10:58 +04:00
parent 972fd73e37
commit ba97cfa20d

View File

@ -92,7 +92,7 @@ public class PlayerSitData {
} }
private Entity sitPlayerOnArrow(Player player, Location arrowloc) throws NoSuchMethodException, SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, InstantiationException, InvocationTargetException private Entity sitPlayerOnArrow(Player player, Location arrowloc) throws NoSuchMethodException, SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, InstantiationException, InvocationTargetException
{ {
Entity arrow = player.getWorld().spawnArrow(arrowloc, new Vector(0, 0.1 ,0), 0, 0); Entity arrow = player.getWorld().spawnArrow(arrowloc, new Vector(0, 0 ,0), 0, 0);
Method getHandleMethod = arrow.getClass().getDeclaredMethod("getHandle"); Method getHandleMethod = arrow.getClass().getDeclaredMethod("getHandle");
getHandleMethod.setAccessible(true); getHandleMethod.setAccessible(true);
Object nmsarrow = getHandleMethod.invoke(arrow); Object nmsarrow = getHandleMethod.invoke(arrow);