#InventoryClickEvent

1 messages · Page 1 of 1 (latest)

tardy kestrel
#
 @EventHandler
    public void onInventoryClick(InventoryClickEvent event){
    HumanEntity clicked = event.getWhoClicked();
}

Will the clicked variable always be an instance of a player? or can it be something else?

tame perch
#
    Player p = Bulkit.getPlayer(human.getName());
}``` use this to check, but most of the time it will be
tardy kestrel
#

I see, what else can it be?

plush karma
#

Nothing to my knowledge just cast player to e.getWhoClicked()

#

No point in checking for something that will never occur

tardy kestrel
#

Yeah, wanted to avoid that
Thank you! :D

long wedge
#

Yeah, I never checked it too.

dim ridge
#

a HumanEntity is always a player @tame perch