Add ability to change player item in hand. Adds BUKKIT-3318
By: Patrick Seidel <psycowithespn1@aim.com>
This commit is contained in:
@@ -102,6 +102,16 @@ public interface PlayerInventory extends Inventory {
|
||||
*/
|
||||
public int getHeldItemSlot();
|
||||
|
||||
/**
|
||||
* Set the slot number of the currently held item.
|
||||
* <p>
|
||||
* This validates whether the slot is between 0 and 8 inclusive.
|
||||
*
|
||||
* @param slot The new slot number
|
||||
* @throws IllegalArgumentException Thrown if slot is not between 0 and 8 inclusive
|
||||
*/
|
||||
public void setHeldItemSlot(int slot);
|
||||
|
||||
/**
|
||||
* Clears all matching items from the inventory. Setting either value to -1 will skip it's check,
|
||||
* while setting both to -1 will clear all items in your inventory unconditionally.
|
||||
|
||||
Reference in New Issue
Block a user