Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # /$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$
- #| $$ /$ | $$| $$ |__/ | $$ | $$|__/ | $$ | $$
- #| $$ /$$$| $$| $$$$$$$ /$$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
- #| $$/$$ $$ $$| $$__ $$| $$|_ $$_/ /$$__ $$| $$| $$ /$$_____/|_ $$_/ /$$_____/| $$ /$$/
- #| $$$$_ $$$$| $$ \ $$| $$ | $$ | $$$$$$$$| $$| $$| $$$$$$ | $$ | $$$$$$ | $$$$$$/
- #| $$$/ \ $$$| $$ | $$| $$ | $$ /$$| $$_____/| $$| $$ \____ $$ | $$ /$$ \____ $$| $$_ $$
- #| $$/ \ $$| $$ | $$| $$ | $$$$/| $$$$$$$| $$| $$ /$$$$$$$/ | $$$$//$$ /$$$$$$$/| $$ \ $$
- #|__/ \__/|__/ |__/|__/ \___/ \_______/|__/|__/|_______/ \___/ |__/|_______/ |__/ \__/
- #---------------------------------------------------------------------------------------------------
- # Whitelist skript made by dvwinn
- # Feel free to edit (if you know what you're doing!)
- # Feel free to use parts of my skript, just don't copy the whole thing and pass it off as your own
- # This was made with the intention of use in UHC games at http://www.reddit.com/r/ultrahardcore
- # To access the default whitelist, use your server settings or /minecraft:whitelist, or /bukkit:whitelist
- # If you need help, do /whitelist or /wl, it will tell you all the commands
- #---------------------------------------------------------------------------------------------------
- #---------------------------------------------------------------------------------------------------
- # Default options, feel free to edit
- #---------------------------------------------------------------------------------------------------
- options:
- prefix : &8[&7Whitelist&8]&7 # The text that appears before each message
- kickmsg : You are not whitelisted! # The message people recieve when they are kicked for not being on the whitelist
- bypass : skript.whitelist.bypass # The permission for people to bypass the whitelist (defaults to OP)
- permission : skript.whitelist # The permission to use the /whitelist and /wl command (defualts to OP)
- variables:
- {whitelist} = false # Just defaulting the whitelist to off when you start the skript
- {wlbroadcast} = op # This is who the whitelist messages broadcast to (With vanilla whitelist it defaults to OP)
- {deathwl} = off # Option of removing people from the whitelist when they die
- #---------------------------------------------------------------------------------------------------
- # The whitelist command
- #---------------------------------------------------------------------------------------------------
- command /whitelist [<text>] [<text>]:
- description: Whitelist command
- usage: /whitelist
- permission: {@permission}
- permission message: ยง4You don't have permission to use this command
- aliases: /wl
- executable by: players and console
- trigger:
- # Turning the whitelist on
- if arg 1 is "on":
- if {whitelist} is false:
- set {whitelist} to true
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} Whitelist on" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} Whitelist on"
- else:
- message "{@prefix} Whitelist on" to command sender
- else:
- message "{@prefix} The whitelist is already on!" to command sender
- # Turning the whitelist off
- else if arg 1 is "off":
- if {whitelist} is true:
- set {whitelist} to false
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} Whitelist off" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} Whitelist off"
- else:
- message "{@prefix} Whitelist off" to command sender
- else:
- message "{@prefix} The whitelist is already off!" to command sender
- # Adding people to the whitelist
- else if arg 1 is "add":
- if arg 2 is not set:
- message "{@prefix} Please set a player or all players to add to the whitelist" to command sender
- else if arg 2 is "all":
- loop all players:
- set {whitelisted::%loop-player%} to true
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} All whitelisted" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} All whitelisted"
- else:
- message "{@prefix} All whitelisted" to command sender
- else:
- set {whitelisted::%arg 2%} to true
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} %arg 2% added to whitelist" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} %arg 2% added to whitelist"
- else:
- message "{@prefix} %arg 2% added to whitelist" to command sender
- # Removing people from the whitelist
- else if arg 1 is "remove":
- if arg 2 is not set:
- message "{@prefix} Please set a player or all players to add to the whitelist" to command sender
- else if arg 2 is "all":
- clear {whitelisted::*}
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} Whitelist emptied" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} Whitelist emptied"
- else:
- message "{@prefix} Whitelist emptied" to command sender
- else:
- delete {whitelisted::%arg 2%}
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} %arg 2% removed from whitelist" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} %arg 2% removed from whitelist"
- else:
- message "{@prefix} %arg 2% removed from whitelist" to command sender
- # Listing all the people on the whitelist
- else if arg 1 is "list":
- loop {whitelisted::*}:
- add "%loop-index%" to {_Temp::*}
- message "{@prefix} Whitelisted players:" to command sender
- message "%{_Temp::*}%" to command sender
- # Changing who can see the whitelist messages
- else if arg 1 is "broadcast":
- if arg 2 is "op":
- set {wlbroadcast} to "op"
- message "{@prefix} Broadcast set to op" to command sender
- else if arg 2 is "all":
- set {wlbroadcast} to "all"
- message "{@prefix} Broadcast set to all" to command sender
- else if arg 2 is "none":
- set {wlbroadcast} to "none"
- message "{@prefix} Broadcast set to none" to command sender
- else:
- message "{@prefix} Please set it to op, all or none" to command sender
- # Toggling death whitelist
- else if arg 1 is "death":
- if arg 2 is "on":
- {deathwl} is "off"
- set {deathwl} to "on"
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} Death whitelist enabled" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} Death whitelist enabled"
- else:
- message "{@prefix} Death whitelist enabled" to command sender
- else if arg 2 is "off":
- {deathwl} is "on"
- set {deathwl} to "off"
- if {wlbroadcast} is "op":
- loop all players:
- loop-player is op
- message "{@prefix} Death whitelist disabled" to loop-player
- else if {wlbroadcast} is "all":
- broadcast "{@prefix} Death whitelist disabled"
- else:
- message "{@prefix} Death whitelist disabled" to command sender
- else:
- message "{@prefix} Please set death whitelist to on/off!"
- # Help command
- else:
- message "{@prefix} List of available commands:" to command sender
- message "/whitelist on &7- Turns the whitelist on" to command sender
- message "/whitelist off &7- Turns the whitelist off" to command sender
- message "/whitelist add <player/all> &7- Adds a player or everyone on the server to the whitelist" to command sender
- message "/whitelist remove <player/all> &7- Removes a player from the whitelist or clears the whitelist" to command sender
- message "/whitelist list &7- Lists everyone on the whitelist currently" to command sender
- message "/whitelist broadcast <op/all/none> &7- Sets who can see broadcasts" to command sender
- message "/whitelist death <on/off> &7- Turns the death whitelist on or off" to command sender
- message "To access the default whitelist, do /bukkit:whitelist" to command sender
- #---------------------------------------------------------------------------------------------------
- # Whitelist events
- #---------------------------------------------------------------------------------------------------
- on connect:
- {whitelist} is true
- {whitelisted::%player%} is not set
- player does not have permission "{@bypass}"
- kick the player due to "{@kickmsg}"
- on death of player:
- {deathwl} is "on"
- delete {whitelisted::%victim%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement