Furnace inventory opens, but there are no furnace recipes themselves

Discussion in 'Plugin Development' started by DreamSmoke, Sep 13, 2019.

Thread Status:
Not open for further replies.
  1. Offline


        public void onPlayerClick(PlayerInteractEvent e) {
            Player player = e.getPlayer();
            Action action = e.getAction();
            if(action == action.RIGHT_CLICK_AIR || action == action.RIGHT_CLICK_BLOCK) {
                Inventory inv = Bukkit.createInventory(player, InventoryType.FURNACE);
                ItemStack stack = player.getItemInHand();
                if(stack == null) {
                if(stack.getTypeId() == 263) {
    Thanks for attention :rolleyes:
  2. Offline


    That's because you only open the GUI. You could place a furnace block somewhere in the world and pass it as the InventoryHolder (I believe) or you have to manually do the cooking process. Either with packets or using InventoryView#Property
  3. Offline


    If the player is not in the world where the stove is installed? He couldn’t probably be able to open it then?
    How exactly do I need to work with InventoryView # Property? I saw a method with opening an inventory for a player with this argument, but probably this is not what I need, can you help me figure this out?
Thread Status:
Not open for further replies.

Share This Page