Hiya, Just still doing my very basics and learning spigot / java, I was wondering I am trying to setup and Event for an Item that is obtained with a command. What I have setup so far, is just simply the command that runs and gives you the item, and the event that I want the item too run once it is right clicked. However I am not too sure on how you are suppose to use an ItemStack in a completely different class. Thanks! I'm not looking to be spoonfed, I just would like a pointer in the right direction as google really couldn't help me.
ItemStack has a isSimilar method which you can use for comparison. If your ItemStack isn't changing you could technically define it as a constant and this way use it in all classes, otherwise a option would be to encapsulate it in a object that holds the item(s) for you and use dependency injection to make it accessible where you need it.