Class NMSExtras
java.lang.Object
com.cryptomorin.xseries.reflection.minecraft.NMSExtras
Note: This class is currently really unorganized and unstable. It needs a proper recode.
A class that provides various different essential features that the API didn't/doesn't support.
All the parameters are non-null.
- Version:
- 5.5.0
- Author:
- Crypto Morin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOrder of this enum should not be changed.static enumstatic enumstatic enumstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final Class<?> static final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final Class<?> static final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final Class<?> static final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandlestatic final MethodHandle -
Method Summary
Modifier and TypeMethodDescriptionstatic voidanimation(Collection<? extends org.bukkit.entity.Player> players, org.bukkit.entity.LivingEntity entity, NMSExtras.Animation animation) For the trident riptide animation usespinEntity(LivingEntity, boolean)instead.static voidchest(org.bukkit.block.Block chest, boolean open) static Objectstatic ObjectgetDataWatcher(Object handle) static @Nullable ObjectgetEntityHandle(org.bukkit.entity.Entity entity) static ObjectgetStaticField(Class<?> clazz, String name, boolean silent) static ObjectgetStaticFieldIgnored(Class<?> clazz, String name) static booleanhasLivingEntityFlag(org.bukkit.entity.Entity entity, int index) booleanisAutoSpinAttack(org.bukkit.entity.LivingEntity entity) static voidlightning(Collection<org.bukkit.entity.Player> players, org.bukkit.Location location, boolean sound) https://minecraft.wiki/w/Damage#Lightning_damage Lightnings deal 5 damage.static voidlightning(org.bukkit.entity.Player player, org.bukkit.Location location, boolean sound) static voidopenSign(org.bukkit.entity.Player player, org.bukkit.DyeColor textColor, String[] lines, boolean frontSide) Currently only supports 1.17protected static voidsendBlockChange(org.bukkit.entity.Player player, org.bukkit.Chunk chunk, Map<NMSExtras.WorldlessBlockWrapper, Object> blocks) Deprecated.static Objectstatic voidsetExp(org.bukkit.entity.Player player, float bar, int lvl, int exp) static voidsetLivingEntityFlag(org.bukkit.entity.Entity entity, int index, boolean flag) static voidspinEntity(org.bukkit.entity.LivingEntity entity, boolean enabled)
-
Field Details
-
EntityLiving
-
EXP_PACKET
-
ENTITY_PACKET
-
WORLD_HANDLE
-
ENTITY_HANDLE
-
LIGHTNING_ENTITY
-
VEC3D
-
GET_DATA_WATCHER
-
DATA_WATCHER_GET_ITEM
-
DATA_WATCHER_SET_ITEM
-
PACKET_PLAY_OUT_OPEN_SIGN_EDITOR
-
PACKET_PLAY_OUT_BLOCK_CHANGE
-
ANIMATION_PACKET
-
ANIMATION_TYPE
-
ANIMATION_ENTITY_ID
-
PLAY_OUT_MULTI_BLOCK_CHANGE_PACKET
-
MULTI_BLOCK_CHANGE_INFO
-
CHUNK_WRAPPER_SET
-
CHUNK_WRAPPER
-
SHORTS_OR_INFO
-
SET_BlockState
-
BLOCK_POSITION
-
PLAY_BLOCK_ACTION
-
GET_BUKKIT_ENTITY
-
GET_BLOCK_TYPE
-
GET_BLOCK
-
GET_IBlockState
-
SANITIZE_LINES
-
TILE_ENTITY_SIGN
-
TILE_ENTITY_SIGN__GET_UPDATE_PACKET
-
TILE_ENTITY_SIGN__SET_LINE
-
SIGN_TEXT
-
BlockState
-
MULTI_BLOCK_CHANGE_INFO_CLASS
-
-
Method Details
-
setExp
public static void setExp(org.bukkit.entity.Player player, float bar, int lvl, int exp) -
lightning
public static void lightning(org.bukkit.entity.Player player, org.bukkit.Location location, boolean sound) -
lightning
public static void lightning(Collection<org.bukkit.entity.Player> players, org.bukkit.Location location, boolean sound) https://minecraft.wiki/w/Damage#Lightning_damage Lightnings deal 5 damage.- Parameters:
players- the players to send the packet to.location- the location to spawn the lightning.sound- if the lightning should have a sound or be silent.
-
getData
-
getEntityHandle
-
getDataWatcher
-
setData
-
getStaticFieldIgnored
-
getStaticField
-
spinEntity
public static void spinEntity(org.bukkit.entity.LivingEntity entity, boolean enabled) -
setLivingEntityFlag
public static void setLivingEntityFlag(org.bukkit.entity.Entity entity, int index, boolean flag) -
hasLivingEntityFlag
public static boolean hasLivingEntityFlag(org.bukkit.entity.Entity entity, int index) -
isAutoSpinAttack
public boolean isAutoSpinAttack(org.bukkit.entity.LivingEntity entity) -
animation
public static void animation(Collection<? extends org.bukkit.entity.Player> players, org.bukkit.entity.LivingEntity entity, NMSExtras.Animation animation) For the trident riptide animation usespinEntity(LivingEntity, boolean)instead. -
chest
public static void chest(org.bukkit.block.Block chest, boolean open) -
sendBlockChange
@Deprecated protected static void sendBlockChange(org.bukkit.entity.Player player, org.bukkit.Chunk chunk, Map<NMSExtras.WorldlessBlockWrapper, Object> blocks) Deprecated.Not completed yet. I have no idea. -
openSign
public static void openSign(org.bukkit.entity.Player player, org.bukkit.DyeColor textColor, String[] lines, boolean frontSide) Currently only supports 1.17
-