- Script Version (do not put latest): Skript 2.2-dev27
- Script Author: Me, ItsDvance
- Minecraft Version: 1.8.9
- Full Code:
Code:
on break of chest:
if the event-block's name != "%player%":
cancel the event
send "&cThis chest can only be modified by &f%event-block's name%"
When running this, and breaking a chest, I am sent "This chest can only be modified by <none>"
I am using > skRayFall, SkQuery, TuSKe, Tablisknu < though this information doesn't matter because this is specifically a 'vanilla' Skript event.
[doublepost=1619338383,1619311161][/doublepost]I solved it myself, but for those who come after me, here's the code I used.
Code:
on break of chest:
if {hub.lobby::%player%} = "survival":
if "%event-block's inventory name%" != "%player%" or "chest" or "Large chest" or "container.chest":
send "&cThis chest can only be modified by &f%event-block's inventory name%"
cancel the event
on place of chest:
if {hub.lobby::%player%} = "survival":
if "%event-block's inventory name%" != "%player%":
cancel the event
send "&cPlace this chest again to lock it."
set the player's tool's name to "%player%"
Fixed my code, 5/14/2021
Last edited: