Guest User

Blacklist

a guest
Apr 20th, 2014
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. options:
  2. Prefix : &9[&cBlacklist&9]&b
  3. KickMSG : Server is full!
  4.  
  5. Blacklist : skript.blacklist
  6. BlacklistNotify : skript.blacklist.notify
  7.  
  8. variables:
  9. {blacklist} = false
  10.  
  11. command /blacklist <text> [<text>]:
  12. usage: /blacklist <command> [<player>]
  13. permission: {@Blacklist}
  14. trigger:
  15. if arg 1 is "enable":
  16. {blacklist} is false:
  17. set {blacklist} to true
  18. loop all players:
  19. loop-player has permission "{@BlacklistNotify}":
  20. message "{@Prefix} Enabled! &9[&aBy: &c%command sender%&9]" to loop-player
  21. else:
  22. message "{@Prefix} The Blacklist is already &aenabled&b!"
  23. else if arg 1 is "disable":
  24. {blacklist} is true:
  25. set {blacklist} to false
  26. loop all players:
  27. loop-player has permission "{@BlacklistNotify}":
  28. message "{@Prefix} Disabled! &9[&aBy: &c%command sender%&9]" to loop-player
  29. else:
  30. message "{@Prefix} The Blacklist is already &adisabled&b!"
  31. else if arg 1 is "toggle":
  32. {blacklist} is false:
  33. set {blacklist} to true
  34. loop all players:
  35. loop-player has permission "{@BlacklistNotify}":
  36. message "{@Prefix} Enabled! &9[&aBy: &c%command sender%&9]"
  37. else:
  38. set {blacklist} to false
  39. loop all players:
  40. loop-player has permission "{@BlacklistNotify}":
  41. message "{@Prefix} Disabled! &9[&aBy: &c%command sender%&9]"
  42. else if arg 1 is "add":
  43. if arg 2 is set:
  44. if {blacklisted::%arg 2%} is true:
  45. message "{@Prefix} The Blacklist &aalready &bcontains &c%arg 2%"
  46. else:
  47. set {blacklisted::%arg 2%} to true
  48. loop all players:
  49. loop-player has permission "{@BlacklistNotify}"
  50.  
  51. message "{@Prefix} &c%command sender% &badded &c%arg 2% &bto the Blacklist!" to loop-player
  52. else:
  53. message "{@Prefix} You must specify who you want to add to the Blacklist!"
  54. else if arg 1 is "remove":
  55. if arg 2 is set:
  56. if {blacklisted::%arg 2%} is true:
  57. delete {blacklisted::%arg 2%}
  58. loop all players:
  59. loop-player has permission "{@BlacklistNotify}"
  60. message "{@Prefix} &c%command sender% &bRemoved &c%arg 2% &bfrom the Blacklist!" to loop-player
  61. else:
  62. message "{@Prefix} The Blacklist &adoes not &bcontain &c%arg 2%"
  63. else:
  64. message "{@Prefix} You must specify who you want to remove from the Blacklist!"
  65. else if arg 1 is "view" or "list":
  66. message "&9>>&cBlacklisted Users&9<<"
  67. message "&b%{blacklisted::*}%"
  68. else if arg 1 is "clear":
  69. clear {blacklisted::*}
  70. loop all players:
  71. loop-player has permission "{@BlacklistNotify}"
  72. message "{@Prefix} &c%command sender% &bsuccessfully cleared the Blacklist!"
  73. else if arg 1 is "help":
  74. message "&c/blacklist enable &a- &bEnables the Blacklist!"
  75. message "&c/blacklist disable &a- &bDisables the Blacklist!"
  76. message "&c/blacklist toggle &a- &bToggles the Blacklist!"
  77. message "&c/blacklist add &a- &bAdds a player to the Blacklist!"
  78. message "&c/blacklist remove &a- &bRemoves a player from the Blacklist!"
  79. message "&c/blacklist view &a- &bViews the Blacklist"
  80. message "&c/blacklist clear &a- &bClears the Blacklist"
  81. message "&c/blacklist help &a- &bThis help page"
  82. else:
  83. message "{@Prefix} Invalid Syntax! Do &c/blacklist help &bfor the commands!"
  84.  
  85. on connect:
  86. {blacklist} is true
  87. {blacklisted::%player%} is true:
  88. kick the player due to "{@KickMSG}"
  89.  
  90. #=By Sitris=#
Advertisement
Add Comment
Please, Sign In to add comment