Class NMS

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

public class NMS extends Object
  • Method Details

    • activate

      public static void activate(Entity entity)
    • 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)
    • calculateDragonPositions

      public static float[][] calculateDragonPositions(float yrot, double[][] latency)
    • callKnockbackEvent

      public static void callKnockbackEvent(NPC npc, float strength, double dx, double dz, Consumer<NPCKnockbackEvent> cb)
    • cancelMoveDestination

      public static void cancelMoveDestination(Entity entity)
    • createBundlePacket

      public static Iterable<Object> createBundlePacket(List<Object> packets)
    • createPacketTracker

      public static EntityPacketTracker createPacketTracker(Entity entity)
    • createPacketTracker

      public static EntityPacketTracker createPacketTracker(Entity entity, EntityPacketTracker.PacketAggregator agg)
    • fillProfileProperties

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

      public static void findProfilesByNames(String[] names, com.mojang.authlib.ProfileLookupCallback cb)
    • 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)
    • getBoundingBoxHeight

      public static double getBoundingBoxHeight(Entity entity)
    • getCollisionBox

      public static BoundingBox getCollisionBox(Block block)
    • getComponentMap

      public static Map<String,Object> getComponentMap(ItemStack item)
    • getDestination

      public static Location getDestination(Entity entity)
    • getFallDistance

      public static int getFallDistance(NPC npc, int def)
    • getField

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

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

      public static List<MethodHandle> getFieldsOfType(Class<?> clazz, Class<?> type)
    • getFinalSetter

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

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

      public static MethodHandle getFinalSetter(Field field, boolean log)
    • getFirstFinalSetter

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

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

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

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

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

      public static MethodHandle getFirstStaticGetter(Class<?> clazz, Class<?> type)
    • 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)
    • getHorizontalMovement

      public static float getHorizontalMovement(Entity bukkitEntity)
    • getJumpPower

      public static float getJumpPower(NPC npc, float original)
    • 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)
    • getPacketTracker

      public static EntityPacketTracker getPacketTracker(Entity entity)
    • getPassengers

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

      public static com.mojang.authlib.GameProfile getProfile(Player player)
    • 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)
    • getSoundPath

      public static String getSoundPath(Sound flag) throws CommandException
      Throws:
      CommandException
    • getSource

      public static Entity getSource(BlockCommandSender sender)
    • 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)
    • getViewingPlayers

      public static Collection<Player> getViewingPlayers(Entity entity)
    • getWidth

      public static double getWidth(Entity entity)
    • getYaw

      public static float getYaw(Entity entity)
    • giveReflectiveAccess

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

      public static boolean isLeashed(NPC npc, Supplier<Boolean> isLeashed, Runnable unleash)
    • isOnGround

      public static boolean isOnGround(Entity entity)
    • isSneaking

      public static boolean isSneaking(Entity entity)
    • isSolid

      public static boolean isSolid(Block in)
    • isValid

      public static boolean isValid(Entity entity)
    • linkTextInteraction

      public static void linkTextInteraction(Player player, Entity interaction, Entity mount, double height)
    • load

      public static void load(CommandManager commands)
    • loadBridge

      public static void loadBridge(String rev) throws Exception
      Throws:
      Exception
    • 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)
    • onPlayerInfoAdd

      public static void onPlayerInfoAdd(Player player, Object source, Function<UUID,MirrorTrait> mirrorTraits)
    • openAnvilInventory

      public static InventoryView openAnvilInventory(Player player, Inventory inventory, String title)
    • openHorseScreen

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

      public static void playAnimation(PlayerAnimation animation, Player player, Iterable<Player> to)
    • playerTicker

      public static Runnable playerTicker(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(FishHook entity)
    • replaceTracker

      public static void replaceTracker(Entity entity)
    • sendPositionUpdate

      public static void sendPositionUpdate(Entity from, Collection<Player> to, boolean position)
    • sendPositionUpdate

      public static void sendPositionUpdate(Entity from, Collection<Player> to, boolean position, Float bodyYaw, Float pitch, Float headYaw)
    • sendPositionUpdateNearby

      public static void sendPositionUpdateNearby(Entity from, boolean position)
    • sendPositionUpdateNearby

      public static void sendPositionUpdateNearby(Entity from, boolean position, Float bodyYaw, Float pitch, Float headYaw)
    • sendTabListAdd

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

      public static void sendTabListRemove(Player recipient, Collection<Player> players)
    • sendTabListRemove

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

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

      public static void setAggressive(Entity entity, boolean aggro)
    • setAllayDancing

      public static void setAllayDancing(Entity entity, boolean dancing)
    • setArmadilloState

      public static void setArmadilloState(Entity entity, ArmadilloTrait.ArmadilloState state)
    • setBodyYaw

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

      public static void setBoundingBox(Entity entity, BoundingBox box)
    • setCamelPose

      public static void setCamelPose(Entity entity, CamelTrait.CamelPose pose)
    • setCustomName

      public static void setCustomName(Entity entity, Object component, String string)
    • setDestination

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

      public static void setDimensions(Entity entity, EntityDim desired)
    • setEndermanAngry

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

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

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

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

      public static void setLocationDirectly(Entity entity, Location location)
    • setLyingDown

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

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

      public static void setNavigationType(Entity entity, NMS.MinecraftNavigationType type)
    • setNoGravity

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

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

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

      public static void setPiglinDancing(Entity entity, boolean dancing)
    • setPitch

      public static void setPitch(Entity entity, float pitch)
    • setPolarBearRearing

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

      public static void setPose(Entity entity, EntityPoseTrait.EntityPose pose)
    • 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)
    • setSnifferState

      public static void setSnifferState(Entity entity, SnifferTrait.SnifferState state)
    • setStepHeight

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

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

      public static void setTextDisplayComponent(Entity entity, Object component)
    • setVerticalMovement

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

      public static void setWardenPose(Entity entity, Object pose)
    • setWitherInvulnerableTicks

      public static void setWitherInvulnerableTicks(Wither wither, int ticks)
    • shouldJump

      public static boolean shouldJump(Entity entity)
    • shutdown

      public static void shutdown()
    • sleep

      public static void sleep(Player entity, boolean sleep)
    • trySwim

      public static void trySwim(Entity entity)
    • trySwim

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

      public static void updateInventoryTitle(Player player, InventoryView view, String newTitle)
    • updateNavigationWorld

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

      public static void updatePathfindingRange(NPC npc, float pathfindingRange)