diff --git a/server/Inventories/Inventory.js b/server/Inventories/Inventory.js new file mode 100644 index 0000000..893d3f9 --- /dev/null +++ b/server/Inventories/Inventory.js @@ -0,0 +1,23 @@ +const ItemStack = require("../ItemStack.js"); + +module.exports = class { + constructor() { + this.Slots = {}; + } + + saveData() { + + } + + loadData() { + + } + + getSlot(slot = 0) { + return this.Slots[slot]; // If the slot doesn't exist well sucks to be you I guess! Haha :Þ + } + + setSlot(slot = 0, itemStack = new ItemStack) { + this.Slots[slot] = itemStack; + } +} \ No newline at end of file diff --git a/server/ItemStack.js b/server/ItemStack.js new file mode 100644 index 0000000..de90af0 --- /dev/null +++ b/server/ItemStack.js @@ -0,0 +1,10 @@ +module.exports = class { + constructor(id, count) { + this.id = id; + this.count = count; + } + + updateCount(count) { + this.count += count; + } +} \ No newline at end of file