mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
SPIGOT-1806: Add HumanEntity#getMainHand
This commit is contained in:
parent
0c042936d8
commit
032d1ff804
2 changed files with 17 additions and 0 deletions
|
@ -2,6 +2,7 @@ package org.bukkit.entity;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.inventory.MainHand;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
|
@ -36,6 +37,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||||
*/
|
*/
|
||||||
public Inventory getEnderChest();
|
public Inventory getEnderChest();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the players selected main hand
|
||||||
|
*
|
||||||
|
* @return the players main hand
|
||||||
|
*/
|
||||||
|
public MainHand getMainHand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the player currently has an inventory window open, this method will
|
* If the player currently has an inventory window open, this method will
|
||||||
* set a property of that window, such as the state of a progress bar.
|
* set a property of that window, such as the state of a progress bar.
|
||||||
|
|
9
src/main/java/org/bukkit/inventory/MainHand.java
Normal file
9
src/main/java/org/bukkit/inventory/MainHand.java
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package org.bukkit.inventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the chosen main hand of a player
|
||||||
|
*/
|
||||||
|
public enum MainHand {
|
||||||
|
LEFT,
|
||||||
|
RIGHT
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue