Virtual Furnace

Discussion in 'Spigot Discussion' started by KSDpolska, Apr 29, 2018.

  1. Hello, I'm trying to make a virtual furnace
    I got this until now:

    Code (Text):
    static HashMap<String, Inventory> FurnaceInventories = new HashMap<String, Inventory>();
       
        public static Inventory PlayerFurnaceInventory (Player p) {
            if (FurnaceInventories.get(p.getName()) != null) {
                return FurnaceInventories.get(p.getName());
            } else {
                Inventory newFurnaceInventory = Bukkit.createInventory(null, InventoryType.FURNACE, "ยง5EnderFurnace");
                FurnaceInventories.put(p.getName(), newFurnaceInventory);
                return newFurnaceInventory;
            }      
        }
    and then
    Code (Text):
    Player p = (Player)     sender;
    p.openInventory(EnderFurnace.PlayerFurnaceInventory(p));
     
    But it only open an Furnace that can't smel anything...
    And also it spam this error to console.

    Code (Text):
    ~[PaperSpigot.jar:git-PaperSpigot-"4c7641d"]
            at net.minecraft.server.v1_8_R3.Container.a(Container.java:447) ~[PaperS
    pigot.jar:git-PaperSpigot-"4c7641d"]
            at net.minecraft.server.v1_8_R3.Container.clickItem(Container.java:259)
    ~[PaperSpigot.jar:git-PaperSpigot-"4c7641d"]
            at net.minecraft.server.v1_8_R3.Container.a(Container.java:447) ~[PaperS
    pigot.jar:git-PaperSpigot-"4c7641d"]

    Someone can help me to make a virtual furnace that can smell.
    THanks in advance.
     
  2. ssamjh

    Moderator

    I can't help with the development side of things but you may want to re-post this thread in this section. :)
     
  3. I have done it.
    Thanks for your help.