Still no luck. SlotPos returns no value.
My code:
@Listener(order = Order.FIRST)
public void clickEvent(ClickInventoryEvent event) {
if (event.getTargetInventory().getName().get().contains("Vote Rewards") ) {
Transaction clickTransaction = event.getTransactions().get(0);
Slot eventinventory = event.getTransactions().get(0).getSlot() ;
SlotPos slotpos = eventinventory.getProperty(SlotPos.class, null).get(); // <- line 130 Optional.empty
trace:
java.util.NoSuchElementException: No value present at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_111] at net.rebelgames.voterewardmenu.VoteRewardMenu.clickEvent(VoteRewardMenu.java:130) ~[VoteRewardMenu.class:?]