I have a plugin where I am creating a custom chest so that it will craft special items. When ever the player closes the chest it will check the location of the chest within an array and if it is there it will create the new item. Is there any way to get the coordinate data for an inventory on the InventoryCloseEvent? Or do any of you recommend using a different event.
I have figured it out. If anyone is wondering the getHolder() function in the inventory object will return the position. So the code will look something like this $event->getInventory()->getHolder()->x
getHolder() can be myriad instances of InventoryHolder that may or may not be a player. You need to check. a player is a position.
Didn't I already say that a player EXTENDS position. He 'is' a position therefore, but i don't like to express it in that way
You said 'getHolder() does not return a position' but it does return InventoryHolder instance which in this case is player and player is also position so things you said are pretty confusing.