VersionUtil

public class VersionUtil

Constructors

Link copied to clipboard
public void VersionUtil()

Types

Link copied to clipboard
public enum Attribute
Useful attribute methods using reflections to circumvent API changes.

Functions

Link copied to clipboard
public static boolean equippableSupported()
Check if the equippable component is supported.
Link copied to clipboard
public static Inventory getBottomInventory(Player player)
Get the bottom inventory of a player.
Link copied to clipboard
public static ItemStack getItemFromSlot(InventoryClickEvent event, int slot)
Get the item from a slot in an inventory click event.
Link copied to clipboard
public static int getMinorMinecraftVersion()
Get the minor Minecraft version.
Link copied to clipboard
public static int getNextEntityId()
Get the next entity ID for spawning entities.
Link copied to clipboard
public static InventoryType getOpenInventoryType(Player player)
Get the open inventory type of a player.
Link copied to clipboard
public static int getPatchMinecraftVersion()
Get the patch Minecraft version.
Link copied to clipboard
public static Inventory getTopInventory(Player player)
Get the top inventory of a player.
Link copied to clipboard
public static boolean hasDataComponents()
Check if data components are supported.
Link copied to clipboard
public static boolean hasInterfaceInsteadOfAbstract()
Check if the server uses interfaces instead of abstract classes.
Link copied to clipboard
public static boolean isSupported()
Check if the current server version is supported.
Link copied to clipboard
public static boolean itemModelSupported()
Check if the item model component is supported.
Link copied to clipboard
public static void sendDestroyPacket(Player player, int entityId)
Send a destroy packet to a player for the preview.
Link copied to clipboard
public static void sendEquipPacket(Player player, int entityId, ItemStack item)
Send an equip packet to a player for the preview.
Link copied to clipboard
public static void sendFakeItem(Player player, ItemStack item, int slot)
Send a fake item to a player in a specific slot.
Link copied to clipboard
public static void sendMetadataPacket(Player player, int entityId, boolean upsideDown)
Send a metadata packet to a player for the preview.
Link copied to clipboard
public static void sendRelativeMoveAndRotatePacket(Player player, int entityId, double yDiff, float currentAngle)
Send a relative move and rotate packet to a player for the preview.
Link copied to clipboard
public static void sendSpawnPacket(Player player, int entityId, boolean upsideDown)
Send a spawn packet for an armor stand to a player for previewing wraps.
Link copied to clipboard
public static void sendTeleportPacket(Player player, int entityId, boolean upsideDown)
Send a teleport packet to a player for the preview.
Link copied to clipboard
public static void setItemInSlot(InventoryClickEvent event, int slot, ItemStack updatedItem)
Set the item in a slot in an inventory click event.
Link copied to clipboard
public static boolean trimsSupported()
Check if trims are supported.