Just because I noticed that I didnt really state it clearly in any of my previous posts. You do need an @EventHandler tag in front of all event...
Bone008 There is no InventoryOpenEvent triggered for player inventories ...thats all you needed to say. I thought you were saying that it was...
You do realize that you couldnt figure out that you named your constructor the same as one of your listener methods... you arent in any place to...
You are naming your listener method the same as your constructor. just name it something else. You also might want to look into java naming...
I think your idea is wrong. The server has to tell the client what is in their inventory every time they open it, because it could have changed...
and you dont have any sort of spawn location mod?
are you sure you are looking at the right area. Where is your location l?
Where do you have it?
I could be wrong, as I have never actually tried this myself, but in order for a player to open their inventory, their computer needs a copy of...
lol almost, sorry about all the miscommunication. Change : l.getX() to l.getBlockX() and l.getZ() to l.getBlockZ()
no, just x and z, not l.getBlockX(). Also, change all get to getBlock.
The "i"s are supposed to be x and z respectively (sorry, it is a habit of mine). You do not in fact need to use getY() because "x","y", and "z"...
oops, the is are supposed to be x and z respectively (sorry habit). You dont use getY(), x,y, and z are allready integers defined by the for loops
You can prevent a player from opening their own inventory. The one they open if the event is canceled is not theirs.
It looks ok to me.. the only thing I see wrong is you have casted an Entity to an Entity again, undoing that wont fix the problem, but it will be...
Separate names with a comma.