Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # LOCKDOWN code yellow - BLOCK DAMAGE v.0.1
- # Commands. Il be honist this could have been smaller and with one command but i couldnt get the argument working. I will try to update it at some point.
- # lockdown on
- command lockdownon:
- trigger:
- set {lockdown.damage.count} to 1
- broadcast "&4&lThe server is in lockdown! Will be unlocked when a admin is online!"
- # lockdown off
- command lockdownoff:
- trigger:
- set {lockdown.damage.count} to 0
- broadcast "&b&lThe server is out of lockdown!"
- # The protection side of things.
- on block damage:
- player does not have permission "admin"
- {lockdown.damage.count} is 1
- cancel event
- message "&4&lThe server is in lockdown! Will be unlocked when a admin is online!"
- # Makes sure, if you forget to lockdown the server when you leave and the logout failed to lock the server down, this will make sure
- # It gets shut down! Better safe then sorry!!
- every 120 seconds:
- if {lockdown.damage.count} is 0:
- number of players is 0
- set {lockdown.damage.count} to 1
- broadcast "&4&lThe server is in lockdown! Will be unlocked when a admin is online!"
- # When you log out and no one is online, it will lock the server down. The broadcast is so you can be assured in the console its locked!
- # The 150 delay is just so you dont change
- on logout:
- wait 150 seconds
- number of players is 0
- set {lockdown.damage.count} to 1
- broadcast "&4&lThe server is in lockdown! Will be unlocked when a admin is online!"
- # Just to let every one know its locked down (only when some one is online, although it will tell you its locked down
- # When you try to smash blocks so feel free to remove if you wish
- every 1300 seconds:
- number of players is 1
- {lockdown.damage.count} is 1
- broadcast "&4&lThe server is in lockdown! Will be unlocked when a admin is online!"
- # When you login, it will lift the lockdown if you have permission "admin"
- on login:
- player has permission "admin"
- wait 40 ticks # this is cause it sometimes fails as soon as you log in
- if {lockdown.damage.count} is 1:
- set {lockdown.damage.count} to 0
- message "&b&lLockdown is now disabled!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement