geforkt von Mirrors/Paper
SPIGOT-1806: Implement HumanEntity#getMainHand
By: Matthew <stteg@hotmail.com>
Dieser Commit ist enthalten in:
Ursprung
c32a32e573
Commit
c851dee005
@ -7,6 +7,7 @@ import net.minecraft.server.*;
|
|||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.inventory.MainHand;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
@ -60,6 +61,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
return enderChest;
|
return enderChest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MainHand getMainHand() {
|
||||||
|
return getHandle().cr() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT; // PAIL Rename cr()->getMainHand()
|
||||||
|
}
|
||||||
|
|
||||||
public ItemStack getItemInHand() {
|
public ItemStack getItemInHand() {
|
||||||
return getInventory().getItemInHand();
|
return getInventory().getItemInHand();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren