Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
on place of any door:
set {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} to player
on break of any door:
if {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} is player:
delete {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%}
else:
send "Only the owner can break this door"
on right click on any door:
if {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} is not player:
if {door::member::%x-coordinate of event-block%::%x-coordinate of event-block%} does not contain player:
cancel event
send "You cant open this door"
command /addmember [<offline player>]:
trigger:
if {door::%x-coordinate of target block%::%x-coordinate of target block%} is player:
if {door::member::%x-coordinate of target block%::%x-coordinate of target block%} does not contain arg-1:
add arg-1 to {door::member::%x-coordinate of target block%::%x-coordinate of target block%}
send "%arg-1% can now open this door"
else:
remove arg-1 from {door::member::%x-coordinate of target block%::%x-coordinate of target block%}
send "%arg-1% can no longer open this door"
else:
send "This isn't your door"
The /addmember command says This isn't your door even that I am the owner of the door, and also players can break the door from the top of the door.try
Code:on place of any door: set {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} to player on break of any door: if {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} is player: delete {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} else: send "Only the owner can break this door" on right click on any door: if {door::owner::%x-coordinate of event-block%::%x-coordinate of event-block%} is not player: if {door::member::%x-coordinate of event-block%::%x-coordinate of event-block%} does not contain player: cancel event send "You cant open this door" command /addmember [<offline player>]: trigger: if {door::%x-coordinate of target block%::%x-coordinate of target block%} is player: if {door::member::%x-coordinate of target block%::%x-coordinate of target block%} does not contain arg-1: add arg-1 to {door::member::%x-coordinate of target block%::%x-coordinate of target block%} send "%arg-1% can now open this door" else: remove arg-1 from {door::member::%x-coordinate of target block%::%x-coordinate of target block%} send "%arg-1% can no longer open this door" else: send "This isn't your door"
on place of any door:
set {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%} to player
on break of any door:
if {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%} is player:
delete {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%}
delete {door::member::%x-coordinate of event-block%::%z-coordinate of event-block%}
else:
cancel event
send "Only the owner can break this door"
on right click on any door:
if {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%} is not player:
if {door::member::%x-coordinate of event-block%::%z-coordinate of event-block%} does not contain player:
cancel event
send "You cant open this door"
command /addmember [<offline player>]:
trigger:
if {door::%x-coordinate of target block%::%z-coordinate of target block%} is player:
if {door::member::%x-coordinate of target block%::%z-coordinate of target block%} does not contain arg-1:
add arg-1 to {door::member::%x-coordinate of target block%::%z-coordinate of target block%}
send "%arg-1% can now open this door"
else:
remove arg-1 from {door::member::%x-coordinate of target block%::%z-coordinate of target block%}
send "%arg-1% can no longer open this door"
else:
send "This isn't your door"
on place of any door:
set {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%} to player
on break of any door:
if {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%} is player:
delete {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%}
delete {door::member::%x-coordinate of event-block%::%z-coordinate of event-block%::*}
else:
cancel event
send "Only the owner can break this door"
on right click on any door:
if {door::owner::%x-coordinate of event-block%::%z-coordinate of event-block%} is not player:
if {door::member::%x-coordinate of event-block%::%z-coordinate of event-block%::*} does not contain player:
cancel event
send "You cant open this door"
command /addmember [<offline player>]:
trigger:
if {door::owner::%x-coordinate of target block%::%z-coordinate of target block%} is player:
if {door::member::%x-coordinate of target block%::%z-coordinate of target block%::*} does not contain arg-1:
add arg-1 to {door::member::%x-coordinate of target block%::%z-coordinate of target block%::*}
send "%arg-1% can now open this door"
else:
remove arg-1 from {door::member::%x-coordinate of target block%::%z-coordinate of target block%::*}
send "%arg-1% can no longer open this door"
else:
send "This isn't your door"