Package net.citizensnpcs.util
Class NMS
java.lang.Object
net.citizensnpcs.util.NMS
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addEntityToWorld
(Entity entity, CreatureSpawnEvent.SpawnReason custom) static void
addOrRemoveFromPlayerList
(Entity entity, boolean remove) static void
attack
(LivingEntity attacker, LivingEntity bukkitTarget) static com.mojang.authlib.GameProfile
fillProfileProperties
(com.mojang.authlib.GameProfile profile, boolean requireSecure) static BlockBreaker
getBlockBreaker
(Entity entity, Block targetBlock, BlockBreaker.BlockBreakerConfiguration config) static Object
getBossBar
(Entity entity) static BoundingBox
getBoundingBox
(Entity handle) static BoundingBox
getCollisionBox
(Block block) static Field
static Field
static MethodHandle
getFinalSetter
(Class<?> clazz, String field) static MethodHandle
getFinalSetter
(Class<?> clazz, String field, boolean log) static MethodHandle
getFirstGetter
(Class<?> clazz, Class<?> type) static MethodHandle
getFirstMethodHandle
(Class<?> clazz, boolean log, Class<?>... params) static MethodHandle
getFirstSetter
(Class<?> clazz, Class<?> type) static MethodHandle
getFirstStaticGetter
(Class<?> clazz, Class<?> type) static com.mojang.authlib.GameProfileRepository
static MethodHandle
static MethodHandle
static float
getHeadYaw
(Entity entity) static double
static float
getHorizontalMovement
(Entity bukkitEntity) static Method
static MethodHandle
getMethodHandle
(Class<?> clazz, String method, boolean log, Class<?>... params) static NPC
getPassengers
(Entity entity) static com.mojang.authlib.GameProfile
getProfile
(SkullMeta meta) static MethodHandle
static MethodHandle
static String
static float
getSpeedFor
(NPC npc) static float
getStepHeight
(Entity entity) getTargetNavigator
(Entity entity, Iterable<Vector> dest, NavigatorParameters params) getTargetNavigator
(Entity entity, Entity target, NavigatorParameters parameters) getTargetNavigator
(Entity entity, Location dest, NavigatorParameters params) static Entity
getVehicle
(Entity entity) static float
getVerticalMovement
(Entity bukkitEntity) static double
static float
static void
giveReflectiveAccess
(Class<?> from, Class<?> to) static boolean
isOnGround
(Entity entity) static boolean
static boolean
static void
load
(CommandManager commands) static void
loadBridge
(String rev) static void
static void
static void
static void
static void
static void
openHorseScreen
(Tameable horse, Player equipper) static void
playAnimation
(PlayerAnimation animation, Player player, int radius) static void
playerTick
(Player entity) static void
registerEntityClass
(Class<?> clazz) static void
static void
removeFromServerPlayerList
(Player player) static void
removeFromWorld
(Entity entity) static void
removeHookIfNecessary
(NPCRegistry npcRegistry, FishHook entity) static void
replaceTrackerEntry
(Player player) static void
sendPositionUpdate
(Player excluding, Entity from, Location storedLocation) static void
sendTabListAdd
(Player recipient, Player listPlayer) static void
sendTabListRemove
(Player recipient, Collection<? extends SkinnableEntity> skinnableNPCs) static void
sendTabListRemove
(Player recipient, Player listPlayer) static void
sendTeamPacket
(Player recipient, Team team, int mode) static void
setBodyYaw
(Entity entity, float yaw) static void
setDestination
(Entity entity, double x, double y, double z, float speed) static void
setEndermanAngry
(Enderman enderman, boolean angry) static void
setHeadYaw
(Entity entity, float yaw) static void
setKnockbackResistance
(LivingEntity entity, double d) static void
setLyingDown
(Entity cat, boolean lying) static void
setNavigationTarget
(Entity handle, Entity target, float speed) static void
setNoGravity
(Entity entity, boolean enabled) static void
setPandaSitting
(Entity entity, boolean sitting) static void
setPeekShulker
(Entity entity, int peek) static void
setPolarBearRearing
(Entity entity, boolean rearing) static void
setProfile
(SkullMeta meta, com.mojang.authlib.GameProfile profile) static void
setShouldJump
(Entity entity) static void
setSitting
(Ocelot ocelot, boolean sitting) static void
setSitting
(Tameable tameable, boolean sitting) static void
setSneaking
(Entity entity, boolean sneaking) static void
setStepHeight
(Entity entity, float height) static void
setTeamNameTagVisible
(Team team, boolean visible) static void
setVerticalMovement
(Entity bukkitEntity, double d) static void
setWitherCharged
(Wither wither, boolean charged) static boolean
shouldJump
(Entity entity) static void
shutdown()
static boolean
static void
static void
static void
updateNavigationWorld
(Entity entity, World world) static void
updatePathfindingRange
(NPC npc, float pathfindingRange)
-
Method Details
-
addEntityToWorld
-
addOrRemoveFromPlayerList
-
attack
-
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
-
getBoundingBox
-
getCollisionBox
-
getField
-
getField
-
getFinalSetter
-
getFinalSetter
-
getFirstGetter
-
getFirstMethodHandle
-
getFirstSetter
-
getFirstStaticGetter
-
getGameProfileRepository
public static com.mojang.authlib.GameProfileRepository getGameProfileRepository() -
getGetter
-
getGetter
-
getHeadYaw
-
getHeight
-
getHorizontalMovement
-
getMethod
-
getMethodHandle
public static MethodHandle getMethodHandle(Class<?> clazz, String method, boolean log, Class<?>... params) -
getNPC
-
getPassengers
-
getProfile
-
getSetter
-
getSetter
-
getSound
- Throws:
CommandException
-
getSpeedFor
-
getStepHeight
-
getVehicle
-
getVerticalMovement
-
getWidth
-
getYaw
-
giveReflectiveAccess
-
isOnGround
-
isSolid
-
isValid
-
load
-
loadBridge
- Throws:
Exception
-
loadPlugins
public static void loadPlugins() -
look
-
look
-
look
-
mount
-
openHorseScreen
-
playAnimation
-
playerTick
-
registerEntityClass
-
remove
-
removeFromServerPlayerList
-
removeFromWorld
-
removeHookIfNecessary
-
replaceTrackerEntry
-
sendPositionUpdate
-
sendTabListAdd
-
sendTabListRemove
public static void sendTabListRemove(Player recipient, Collection<? extends SkinnableEntity> skinnableNPCs) -
sendTabListRemove
-
sendTeamPacket
-
setBodyYaw
-
setDestination
-
setEndermanAngry
-
setHeadYaw
-
setKnockbackResistance
-
setLyingDown
-
setNoGravity
-
setPandaSitting
-
setPeekShulker
-
setPolarBearRearing
-
setProfile
-
setShouldJump
-
setSitting
-
setSitting
-
setSneaking
-
setStepHeight
-
setTeamNameTagVisible
-
setVerticalMovement
-
setWitherCharged
-
shouldJump
-
shutdown
public static void shutdown() -
tick
-
trySwim
-
trySwim
-
updatePathfindingRange
-