13
0
geforkt von Mirrors/Paper

SPIGOT-1806: Add HumanEntity#getMainHand

By: Matthew <stteg@hotmail.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2016-03-11 13:02:00 -05:00
Ursprung b10b2605b1
Commit fe152f147f
2 geänderte Dateien mit 17 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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.

Datei anzeigen

@ -0,0 +1,9 @@
package org.bukkit.inventory;
/**
* Represents the chosen main hand of a player
*/
public enum MainHand {
LEFT,
RIGHT
}