InventoryCloseEvent Reason API
Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not.
This commit is contained in:
@@ -187,6 +187,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void closeInventory();
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Force-closes the currently open inventory view for this player, if any.
|
||||
*
|
||||
* @param reason why the inventory is closing
|
||||
*/
|
||||
public void closeInventory(@NotNull org.bukkit.event.inventory.InventoryCloseEvent.Reason reason);
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Returns the ItemStack currently in your hand, can be empty.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user