Class NMS

java.lang.Object
net.citizensnpcs.util.NMS

public class NMS extends Object
  • Method Details

    • addEntityToWorld

      public static boolean addEntityToWorld(Entity entity, CreatureSpawnEvent.SpawnReason custom)
    • addOrRemoveFromPlayerList

      public static void addOrRemoveFromPlayerList(Entity entity, boolean remove)
    • attack

      public static void attack(LivingEntity attacker, LivingEntity bukkitTarget)
    • fillProfileProperties

      public static com.mojang.authlib.GameProfile fillProfileProperties(com.mojang.authlib.GameProfile profile, boolean requireSecure) throws Throwable
      Throws:
      Throwable
    • getBlockBreaker

      public static BlockBreaker getBlockBreaker(Entity entity, Block targetBlock, BlockBreaker.BlockBreakerConfiguration config)
    • getBossBar

      public static Object getBossBar(Entity entity)
    • getBoundingBox

      public static BoundingBox getBoundingBox(Entity handle)
    • getCollisionBox

      public static BoundingBox getCollisionBox(Block block)
    • getField

      public static Field getField(Class<?> clazz, String field)
    • getField

      public static Field getField(Class<?> clazz, String field, boolean log)
    • getFinalSetter

      public static MethodHandle getFinalSetter(Class<?> clazz, String field)
    • getFinalSetter

      public static MethodHandle getFinalSetter(Class<?> clazz, String field, boolean log)
    • getFirstGetter

      public static MethodHandle getFirstGetter(Class<?> clazz, Class<?> type)
    • getFirstMethodHandle

      public static MethodHandle getFirstMethodHandle(Class<?> clazz, boolean log, Class<?>... params)
    • getFirstSetter

      public static MethodHandle getFirstSetter(Class<?> clazz, Class<?> type)
    • getFirstStaticGetter

      public static MethodHandle getFirstStaticGetter(Class<?> clazz, Class<?> type)
    • getGameProfileRepository

      public static com.mojang.authlib.GameProfileRepository getGameProfileRepository()
    • getGetter

      public static MethodHandle getGetter(Class<?> clazz, String name)
    • getGetter

      public static MethodHandle getGetter(Class<?> clazz, String name, boolean log)
    • getHeadYaw

      public static float getHeadYaw(Entity entity)
    • getHeight

      public static double getHeight(Entity entity)
    • getHorizontalMovement

      public static float getHorizontalMovement(Entity bukkitEntity)
    • getMethod

      public static Method getMethod(Class<?> clazz, String method, boolean log, Class<?>... params)
    • getMethodHandle

      public static MethodHandle getMethodHandle(Class<?> clazz, String method, boolean log, Class<?>... params)
    • getNPC

      public static NPC getNPC(Entity entity)
    • getPassengers

      public static List<Entity> getPassengers(Entity entity)
    • getProfile

      public static com.mojang.authlib.GameProfile getProfile(SkullMeta meta)
    • getSetter

      public static MethodHandle getSetter(Class<?> clazz, String name)
    • getSetter

      public static MethodHandle getSetter(Class<?> clazz, String name, boolean log)
    • getSound

      public static String getSound(String flag) throws CommandException
      Throws:
      CommandException
    • getSpeedFor

      public static float getSpeedFor(NPC npc)
    • getStepHeight

      public static float getStepHeight(Entity entity)
    • getTargetNavigator

      public static MCNavigationStrategy.MCNavigator getTargetNavigator(Entity entity, Iterable<Vector> dest, NavigatorParameters params)
    • getTargetNavigator

      public static MCNavigationStrategy.MCNavigator getTargetNavigator(Entity entity, Location dest, NavigatorParameters params)
    • getTargetNavigator

      public static MCTargetStrategy.TargetNavigator getTargetNavigator(Entity entity, Entity target, NavigatorParameters parameters)
    • getVehicle

      public static Entity getVehicle(Entity entity)
    • getVerticalMovement

      public static float getVerticalMovement(Entity bukkitEntity)
    • getWidth

      public static double getWidth(Entity entity)
    • getYaw

      public static float getYaw(Entity entity)
    • giveReflectiveAccess

      public static void giveReflectiveAccess(Class<?> from, Class<?> to)
    • isOnGround

      public static boolean isOnGround(Entity entity)
    • isSolid

      public static boolean isSolid(Block in)
    • isValid

      public static boolean isValid(Entity entity)
    • load

      public static void load(CommandManager commands)
    • loadBridge

      public static void loadBridge(String rev) throws Exception
      Throws:
      Exception
    • loadPlugins

      public static void loadPlugins()
    • look

      public static void look(Entity entity, float yaw, float pitch)
    • look

      public static void look(Entity entity, Location to, boolean headOnly, boolean immediate)
    • look

      public static void look(Entity bhandle, Entity btarget)
    • mount

      public static void mount(Entity entity, Entity passenger)
    • openHorseScreen

      public static void openHorseScreen(Tameable horse, Player equipper)
    • playAnimation

      public static void playAnimation(PlayerAnimation animation, Player player, int radius)
    • playerTick

      public static void playerTick(Player entity)
    • registerEntityClass

      public static void registerEntityClass(Class<?> clazz)
    • remove

      public static void remove(Entity entity)
    • removeFromServerPlayerList

      public static void removeFromServerPlayerList(Player player)
    • removeFromWorld

      public static void removeFromWorld(Entity entity)
    • removeHookIfNecessary

      public static void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity)
    • replaceTrackerEntry

      public static void replaceTrackerEntry(Player player)
    • sendPositionUpdate

      public static void sendPositionUpdate(Player excluding, Entity from, Location storedLocation)
    • sendTabListAdd

      public static void sendTabListAdd(Player recipient, Player listPlayer)
    • sendTabListRemove

      public static void sendTabListRemove(Player recipient, Collection<? extends SkinnableEntity> skinnableNPCs)
    • sendTabListRemove

      public static void sendTabListRemove(Player recipient, Player listPlayer)
    • sendTeamPacket

      public static void sendTeamPacket(Player recipient, Team team, int mode)
    • setBodyYaw

      public static void setBodyYaw(Entity entity, float yaw)
    • setDestination

      public static void setDestination(Entity entity, double x, double y, double z, float speed)
    • setEndermanAngry

      public static void setEndermanAngry(Enderman enderman, boolean angry)
    • setHeadYaw

      public static void setHeadYaw(Entity entity, float yaw)
    • setKnockbackResistance

      public static void setKnockbackResistance(LivingEntity entity, double d)
    • setLyingDown

      public static void setLyingDown(Entity cat, boolean lying)
    • setNavigationTarget

      public static void setNavigationTarget(Entity handle, Entity target, float speed)
    • setNoGravity

      public static void setNoGravity(Entity entity, boolean enabled)
    • setPandaSitting

      public static void setPandaSitting(Entity entity, boolean sitting)
    • setPeekShulker

      public static void setPeekShulker(Entity entity, int peek)
    • setPolarBearRearing

      public static void setPolarBearRearing(Entity entity, boolean rearing)
    • setProfile

      public static void setProfile(SkullMeta meta, com.mojang.authlib.GameProfile profile)
    • setShouldJump

      public static void setShouldJump(Entity entity)
    • setSitting

      public static void setSitting(Ocelot ocelot, boolean sitting)
    • setSitting

      public static void setSitting(Tameable tameable, boolean sitting)
    • setSneaking

      public static void setSneaking(Entity entity, boolean sneaking)
    • setStepHeight

      public static void setStepHeight(Entity entity, float height)
    • setTeamNameTagVisible

      public static void setTeamNameTagVisible(Team team, boolean visible)
    • setVerticalMovement

      public static void setVerticalMovement(Entity bukkitEntity, double d)
    • setWitherCharged

      public static void setWitherCharged(Wither wither, boolean charged)
    • shouldJump

      public static boolean shouldJump(Entity entity)
    • shutdown

      public static void shutdown()
    • tick

      public static boolean tick(Entity next)
    • trySwim

      public static void trySwim(Entity entity)
    • trySwim

      public static void trySwim(Entity entity, float power)
    • updateNavigationWorld

      public static void updateNavigationWorld(Entity entity, World world)
    • updatePathfindingRange

      public static void updatePathfindingRange(NPC npc, float pathfindingRange)