Title basically explains the question. How would I get the location of the opened inventory in the "on inventory open" event? (People who have never touched spigot, what I mean is the location of the block that owns the opened inventory)
Example of what i'm looking for:
Note: %event-location% and %location% only return the player's location. I also need it to return a raw xyz location for the command to work, so the command should look more like
"/setblock %event-inventory's-x-location% %event-inventory's-y-location% %event-inventory's-z-location% chest"
If someone knows how to set blocks using json tags ({LootTable:'chests/simple_dungeon'} in particular) using skript instead of using commands, that would be sufficient as well.
Example of what i'm looking for:
Code:
on inventory open:
send "inventory"
if event-inventory's name is "Tier I":
send "Tier I"
send "%event-inventory's-location%"
make console execute command "/setblock %event-inventory's location% minecraft:chest 2 replace {LootTable:'chests/simple_dungeon'}"
Note: %event-location% and %location% only return the player's location. I also need it to return a raw xyz location for the command to work, so the command should look more like
"/setblock %event-inventory's-x-location% %event-inventory's-y-location% %event-inventory's-z-location% chest"
If someone knows how to set blocks using json tags ({LootTable:'chests/simple_dungeon'} in particular) using skript instead of using commands, that would be sufficient as well.
Last edited: