Open SniperTVmc opened 6 months ago
Hi @SniperTVmc, could you send a video showing the problem? I was unable to reproduce the issue.
Here the two moments when the error occurs are when I try to throw the item from the GUI. Normaly this item is used to close the GUI, I don't know if this has anything to do with it?
[
https://github.com/hpfxd/PandaSpigot/assets/53542570/6dc11c5b-9eba-4544-889f-20e2e8150a16
](url)
And here's the part of my code that might influence the problem:
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
ItemStack clickedItem = event.getCurrentItem();
Player player = (Player) event.getWhoClicked();
if ((player.getOpenInventory().getTitle().equals("§8§l» §8Menu Principal"))) {
if (clickedItem != null && clickedItem.getType() != Material.AIR) {
String clickedItemName = clickedItem.getItemMeta().getDisplayName();
if (clickedItemName.equals("§8§l» §6§lHunters's Strike")) {
sendPlayerToServer.sendPlayerToServer(player, "hsSolo01");
return;
}
if (clickedItemName.equals("§8§l» §c§lFermer le Menu")) {
player.closeInventory();
player.playSound(player.getLocation(), Sound.CHICKEN_EGG_POP, 1.0f, 1.0f);
return;
}
}
}
}
Hi, I've developped a Java Plugin, in which allow me to manage custom created inventories.
Then, in a custom created chest inventory (from 1 to 6 rows), when I try to "drop" (just the action, the drop keystroke) an item from row 3 to 6, I receive an error in the console. Theresn't really a problem which impact the players's gameplay, but if we can avoid to receive or spam the console of this errors, that can be great. :)
Thank you and good work for this PaperSpigot fort! :D