public class PlayerUtils
extends java.lang.Object
Constructor and Description |
---|
PlayerUtils() |
Modifier and Type | Method and Description |
---|---|
static net.minecraft.util.Hand |
getHandStackIsIn(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.item.ItemStack stack)
Gets what hand this item is in, this does an object match so you must send the object, not match by values
|
static boolean |
isPlayerHoldingEither(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.item.Item item)
Checks if the player is holding the given item in either hand
|
public static boolean isPlayerHoldingEither(net.minecraft.entity.player.PlayerEntity player, net.minecraft.item.Item item)
player
- The player entityitem
- The item to checkpublic static net.minecraft.util.Hand getHandStackIsIn(net.minecraft.entity.player.PlayerEntity player, net.minecraft.item.ItemStack stack)
stack
- The object