use of com.denizenscript.denizen.nms.v1_17.impl.network.handlers.AbstractListenerPlayInImpl in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelperImpl method setFlyKickCooldown.
@Override
public void setFlyKickCooldown(Player player, int ticks) {
ticks = 80 - ticks;
ServerGamePacketListenerImpl conn = ((CraftPlayer) player).getHandle().connection;
if (conn instanceof AbstractListenerPlayInImpl) {
conn = ((AbstractListenerPlayInImpl) conn).oldListener;
}
try {
FLY_TICKS.setInt(conn, ticks);
VEHICLE_FLY_TICKS.setInt(conn, ticks);
} catch (IllegalAccessException e) {
Debug.echoError(e);
}
}
use of com.denizenscript.denizen.nms.v1_17.impl.network.handlers.AbstractListenerPlayInImpl in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelperImpl method setFlyKickCooldown.
@Override
public void setFlyKickCooldown(Player player, int ticks) {
ticks = 80 - ticks;
ServerGamePacketListenerImpl conn = ((CraftPlayer) player).getHandle().connection;
if (conn instanceof AbstractListenerPlayInImpl) {
conn = ((AbstractListenerPlayInImpl) conn).oldListener;
}
try {
FLY_TICKS.setInt(conn, ticks);
VEHICLE_FLY_TICKS.setInt(conn, ticks);
} catch (IllegalAccessException e) {
Debug.echoError(e);
}
}
Aggregations