Code: @EventHandler public void onClose(InventoryCloseEvent e){ Inventory inv = Bukkit.createInventory(null, 9, ChatColor.translateAlternateColorCodes('&', "&d&lWELCOME!")); e.getPlayer().openInventory(inv); } Works the first time then doesn't work
@MCMatters Can you be a little more descriptive in what you mean? What do you mean by "doesn't work"? What is different between the first and second time?
10/10 Much descriptive, such inventory, wow. Does any inventory open? does the event fire? do you get any stack traces? Using this method any inventory they close will open your new one. Debug messages anywhere? What have you tried to fix this?
You are trying to open an inventory at the exact moment in which they are closing their inventory. Put on a delay of a tick or two and that may solve your issue.