Commit 6ddbb9dc authored by Atsukio's avatar Atsukio 🐬

Town - Shortened code, to not use unnecessary loop

parent e0a58e43
......@@ -1425,34 +1425,24 @@ on block damage:
if {language.%player%} is "english":
message "[&6PTown&f] &4This is not your town!"
on right click:
add "DISPENSER" and "DROPPER" and "CAULDRON" and "JUKEBOX" to {_protect::*}
add "HOPPER" and "BREWING STAND" to {_protect::*}
add "NORMAL SHULKER BOX" and "WHITE SHULKER BOX" and "BLACK SHULKER BOX" and "BLUE SHULKER BOX" to {_protect::*}
add "BROWN SHULKER BOX" and "CYAN SHULKER BOX" and "GRAY SHULKER BOX" and "GREEN SHULKER BOX" to {_protect::*}
add "LIGHT BLUE SHULKER BOX" and "LIGHT GRAY SHULKER BOX" and "LIME SHULKER BOX" and "MAGENTA SHULKER BOX" to {_protect::*}
add "ORANGE SHULKER BOX" and "PINK SHULKER BOX" and "PURPLE SHULKER BOX" and "RED SHULKER BOX" to {_protect::*}
add "YELLOW SHULKER BOX" to {_protect::*}
loop {_protect::*}:
if "%type of clicked block%" is loop-value:
if {ptown.%player%.adminmode} is not set:
if {ptown.%player%} is not set:
if {ptownlist.chunk::%chunk at event-block%} is set:
cancel event
if {language.%player%} is "chinese":
message "[&6PTown&f] &4这不是您的小镇!"
if {language.%player%} is "english":
message "[&6PTown&f] &4This is not your town!"
stop
set {_ptownbreakchunk} to {ptown.%player%}
if {ptownlist.chunk::%chunk at event-block%} is set:
if {ptownlist.chunk::%chunk at event-block%} is not equal to {_ptownbreakchunk}:
cancel event
if {language.%player%} is "chinese":
message "[&6PTown&f] &4这不是您的小镇!"
if {language.%player%} is "english":
message "[&6PTown&f] &4This is not your town!"
stop
on right click on dispenser or dropper or cauldron or jukebox or hopper or brewing stand or any shulker box:
if {ptown.%player%.adminmode} is not set:
if {ptown.%player%} is not set:
if {ptownlist.chunk::%chunk at event-block%} is set:
cancel event
if {language.%player%} is "chinese":
message "[&6PTown&f] &4这不是您的小镇!"
if {language.%player%} is "english":
message "[&6PTown&f] &4This is not your town!"
stop
set {_ptownbreakchunk} to {ptown.%player%}
if {ptownlist.chunk::%chunk at event-block%} is set:
if {ptownlist.chunk::%chunk at event-block%} is not equal to {_ptownbreakchunk}:
cancel event
if {language.%player%} is "chinese":
message "[&6PTown&f] &4这不是您的小镇!"
if {language.%player%} is "english":
message "[&6PTown&f] &4This is not your town!"
on right click on an armor stand:#start
if {ptown.%player%.adminmode} is not set:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment