From b88f5eba36f8f62892b10f17ea094d5bcb884ea1 Mon Sep 17 00:00:00 2001 From: Chris Sanders Date: Sat, 17 Sep 2016 22:46:51 -0500 Subject: [PATCH] Rename HumanInventory to PlayerInventory, add utility getters. Signed-off-by: Chris Sanders --- ...manInventory.java => PlayerInventory.java} | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) rename src/main/java/org/spongepowered/api/item/inventory/entity/{HumanInventory.java => PlayerInventory.java} (71%) diff --git a/src/main/java/org/spongepowered/api/item/inventory/entity/HumanInventory.java b/src/main/java/org/spongepowered/api/item/inventory/entity/PlayerInventory.java similarity index 71% rename from src/main/java/org/spongepowered/api/item/inventory/entity/HumanInventory.java rename to src/main/java/org/spongepowered/api/item/inventory/entity/PlayerInventory.java index d9f3b46e5c0..c77afe1669c 100644 --- a/src/main/java/org/spongepowered/api/item/inventory/entity/HumanInventory.java +++ b/src/main/java/org/spongepowered/api/item/inventory/entity/PlayerInventory.java @@ -24,9 +24,12 @@ */ package org.spongepowered.api.item.inventory.entity; -import org.spongepowered.api.entity.living.Humanoid; +import org.spongepowered.api.entity.living.player.Player; +import org.spongepowered.api.item.inventory.Slot; import org.spongepowered.api.item.inventory.crafting.CraftingInventory; +import org.spongepowered.api.item.inventory.equipment.EquipmentInventory; import org.spongepowered.api.item.inventory.type.CarriedInventory; +import org.spongepowered.api.item.inventory.type.GridInventory; /** * Represents the inventory of a Humanoid or Player. Implementors of this interface @@ -37,13 +40,34 @@ * {@link CraftingInventory} * */ -public interface HumanInventory extends CarriedInventory { +public interface PlayerInventory extends CarriedInventory { /** - * Get the hotbar inventory. + * Gets the hotbar inventory. * * @return the hotbar */ Hotbar getHotbar(); + /** + * Gets the main inventory. + * + * @return the hotbar + */ + GridInventory getMain(); + + /** + * Gets the equipment inventory. + * + * @return the hotbar + */ + EquipmentInventory getEquipment(); + + /** + * Gets the offhand inventory. + * + * @return the hotbar + */ + Slot getOffhand(); + }