Closed cmptrwhz closed 2 months ago
Does it work when you call signScreen.MakeSign()
from somewhere else? For example try to do it when the player executes a command.
If it works then, you could try to wait a tick before opening the sign by running a synchronized task:
player.closeInventory();
Bukkit.getScheduler().schedule(DezoMarket.getInstance(), () -> {
SignScreen signScreen = new SignScreen();
signScreen.MakeSign();
});
For me it always worked when I called it directly from an InventoryClickEvent but maybe you're on another server version / software and that's because it doesn't.
Btw: this has nothing to do with your problem, but you maybe should inform yourself about Java naming conventions: variable and method names should always be lowerCamelCase and not UpperCamelCase.
Thank you
What are you trying to do? I have an inventory gui displayed to the player. within the inventory gui I have a sign for the user to click on. The purpose of the sign is to get the numerical amount the player wants to sell their item for.
What do you need help with? I am not getting any errors when the player clicks the sign but yet there is no sign being displayed.
Code snippets Java plugin main
Registered events for when a user clicks on something in the inventory gui that is open.
Sign creation class
Error messages No errors are being reported during compile, none on player screen, and no errors in console.
Additional context Add any other context about the problem here.