diff --git a/TShockAPI/PlayerData.cs b/TShockAPI/PlayerData.cs index aae27672..b2866eb1 100644 --- a/TShockAPI/PlayerData.cs +++ b/TShockAPI/PlayerData.cs @@ -96,12 +96,22 @@ namespace TShockAPI /// public void StoreSlot(int slot, int netID, byte prefix, int stack) { - if (slot > (this.inventory.Length - 1)) //if the slot is out of range then dont save + StoreSlot(slot, new NetItem(netID, stack, prefix)); + } + + /// + /// Stores an item at the specific storage slot + /// + /// + /// + public void StoreSlot(int slot, NetItem item) + { + if (slot > (this.inventory.Length - 1) || slot < 0) //if the slot is out of range then dont save { return; } - this.inventory[slot] = new NetItem(netID, stack, prefix); + this.inventory[slot] = item; } ///