Warning: Undefined variable $http_response_header in /var/www/html/new/skunity/library/skUnity/Util/HTTP.php on line 95

maintenance.sk

Created by jsjjjsjsjjsjsjs

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

#Coded by: jsjjjsjsjjsjsjs
command /maintenance:
	description: Maintenance
	executable by: players, console
	permission: maintenance.start
	trigger:
		make player execute command "/save-all"
        broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE STARTED BY %player%&4&l(!)"
		wait 50 tick
		broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE IN &45"
		wait 20 tick
		broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE IN &44"
		wait 20 tick
		broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE IN &43"
		wait 20 tick
		broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE IN &42"
		wait 20 tick
		broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE IN &41"
		wait 20 tick
        broadcast "&b[Announcements] &4&l(!) &c&lSERVER MAINTENANCE &4&l(!)"
		wait 40 tick
		make player execute command "/lockdown Server Maintenance in progress Check back later!"


# ====================
#  INSTALLATION
# ====================
# If you already have the skript plugin installed, you can skip the first 3 steps
# 1. If you do not have the skript plugin yet, download it from here: http://dev.bukkit.org/bukkit-plugins/skript/
# 2. Place the skript.jar file in your plugins folder
# 3. Restart your server
# 4. Customize this skript under the "options" section
# 5. Place this file into your scripts folder located under plugins/Skript/scripts
# 6. Type /skript reload all ingame
# 7. Done :)
# If the skript is not working properly please contact the author.
# You are not allowed to leave a bad review, refund or cancel your request if it is not working like you wished


# ====================
#  OPTIONS
# ====================
# p = prefix
# c. = colorcode (&a, &b, &1..)
# t. = text
# m. = message
options:
# Prefix used for all messages
    p: &7[&cLOCK&7]
    
# Whether there should be a space between the lines and the help message
    b.space: true
    
# Lines used for the help message
    t.lines: &7=====================================
    
# Colorcode used for /command in help message
    c.help: &c
    
# Colorcode used for the description in the help message
    c.desc: &f
    
# Message that gets send to the executor when he removes the current lockdown
    m.end: &aYou ended the current lockdown!
    
# Message that gets send to players with the notify permission when someone removes the lockdown
    m.ended: &b%player% removed the current lockdown!
    
# Message that gets send to the player when he tries to remove an unexisting lockdown or when there is no lock active in a /lock info
    m.notlocked: &cThe server is currently not locked!
    
# Message in /lock info when the lock is active
    m.active: &aLockdown active
    
# The kick-message used for the lockdown (use %{_reason}% for the reason and %nl% for a new line)
    t.reason: &c&lLOCKDOWN ACTIVE%nl%%nl%       &c%{_reason}%%nl%%nl%&7Sorry for the inconvenience!%nl%%nl%&6Please visit our website for more information%nl%&b
    
# Message used to say that a lock is now active
    m.start: &aLockdown activated! &fReason: &c%{_reason}%
    
# Message used when the player doesn't have the right permission
    m.noperm: &cYou do not have the required permission for this command!
    
# Message send to players with notify permission when a player tries to join during a lockdown
    m.tried: &7%player% tried to join!
    
    
# ====================
#  PERMISSIONS
# ====================
# - lockdown.lock - To lock the server and to end lockdowns
# - lockdown.bypass - To bypass a lockdown
# - lockdown.notify - To get notifications when the server gets unlocked or when a player tries to join during a lockdown
# - lockdown.info - Can use /lock or /lock info to see the current lockdown status

# ====================
#  THE SKRIPT
# ====================
command /lockdown [<text>]:
    aliases: /lock
    trigger:
        if the player has the permission "lockdown.lock":
            if arg 1 is not set:
                message "{@t.lines}"
                if {@b.space} is true:
                    message ""
                message "{@c.help}/lock <reason> {@c.desc}Locks the server"
                if the player has the permission "lockdown.info":
                    message "{@c.help}/lock info {@c.desc}See the current lockdown"
                message "{@c.help}/lock end {@c.desc}Ends the current lockdown"
                if {@b.space} is true:
                    message ""
                message "{@t.lines}"
            else if arg 1 is "end":
                set {_enabled} to yaml value "enabled" from file "../Data/Lockdown/config.yml"
                if {_enabled} is true:
                    set yaml value "enabled" from file "../Data/Lockdown/config.yml" to false
                    message "{@p} {@m.end}"
                    loop all players:
                        if the loop-player has the permission "lockdown.notify":
                            if the loop-player is not the player:
                                message "{@p} {@m.ended}"
                else:
                    message "{@p} {@m.notlocked}"
            else if arg 1 is "info":
                if the player has the permission "lockdown.info":
                    set {_enabled} to yaml value "enabled" from file "../Data/Lockdown/config.yml"
                    set {_reason} to yaml value "reason" from file "../Data/Lockdown/config.yml"
                    if {_enabled} is true:
                        message "{@p} {@m.active}: &f%{_reason}%"
                    else:
                        message "{@p} {@m.notlocked}"
                else:
                    make player execute command "lockdown"
            else:
                set yaml value "enabled" from file "../Data/Lockdown/config.yml" to true
                set {_reason} to arg 1
                set yaml value "reason" from file "../Data/Lockdown/config.yml" to {_reason}
                loop all players:
                    if loop-player does not have the permission "lockdown.bypass":
                        kick the loop-player due to "{@t.reason}"
                broadcast "{@p} {@m.start}"
        else if the player has permission "lockdown.info":
            message "{@t.lines}"
            if {@b.space} is true:
                message ""
            set {_enabled} to yaml value "enabled" from file "../Data/Lockdown/config.yml"
            set {_reason} to yaml value "reason" from file "../Data/Lockdown/config.yml"
            if {_enabled} is true:
                message "{@p} {@m.active}: &f%{_reason}%"
            else:
                message "{@p} {@m.notlocked}"      
            if {@b.space} is true:
                message ""
            message "{@t.lines}"
        else:
            message "{@m.noperm}"
on connect:
    if the player does not have the permission "lockdown.lock":
        set {_enabled} to yaml value "enabled" from file "../Data/Lockdown/config.yml"
        if {_enabled} is true:
            set {_reason} to yaml value "reason" from file "../Data/Lockdown/config.yml"
            kick the player due to "{@t.reason}"
            loop all players:
                if the loop-player has permission "lockdown.notify":
                    message "{@p} {@m.tried}" to the loop-player