Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &c[CLANS]&f
- Version: "1.2.3"
- #
- # Hey there.
- # If you feel like you know what you're doing, by all means go ahead and edit it.
- # But if something breaks, it will be irreversible.
- #
- on join:
- if player is op:
- set {_ver} to text from "https://pastebin.com/raw/RmEtgkma"
- if {_ver} != {@Version}:
- send "{@P} You're using an outdated version of {@P}. You're running &6"{@Version}"&f, while the newest version is &6""%{_ver}%""&f.&9 https://www.spigotmc.org/resources/clans.70102/"
- else:
- send "{@P} You are using the newest version of {@P}."
- on script load:
- if {clan::names::*} is not set:
- add "" to {clan::names::*}
- every 5 minutes:
- loop all players:
- if {clan::%loop-player's uuid%} is set:
- add 1 to {clan::coins::%{clan::%loop-player's uuid%}%}
- send "{@P} +1 clan coins." to loop-player
- command /clan [<text>] [<text>] [<text>]:
- aliases: c, clans
- trigger:
- if arg-1 is "create":
- if {clan::%player's uuid%} is not set:
- if arg-2 is set:
- if arg-3 is set:
- send "{@P} Clan names can only be one word."
- stop
- if arg-2 contains "-" or "_" or "." or ";" or ":" or "@" or "," or "/" or "!":
- send "{@P} Illegal character in your clan name."
- stop
- else if {clan::names::*} does not contain arg-2:
- set {clan::%executor's uuid%} to arg-2
- add arg-2 to {clan::names::*}
- set {clan::owner::%arg-2%} to "%executor%"
- add "%executor%" to {clan::admins::%arg-2%::*}
- set {clan::coins::%arg-2%} to 0
- add "%executor%" to {clan::memberlist::%arg-2%::*}
- add 1 to {clan::members::%arg-2%}
- send "{@P} Clan &6%{clan::%executor's uuid%}%&f created."
- else:
- send "{@P} This clan name is taken."
- else:
- send "{@P} Enter a clan name."
- else:
- send "{@P} You're already in a clan."
- else if arg-1 is "info":
- if arg-2 is not set:
- if {clan::%player's uuid%} is set:
- send "{@P} Clan &6%{clan::%executor's uuid%}%&f information."
- send "&7> &cOwner: &f%{clan::owner::%{clan::%player's uuid%}%}%"
- send "&7> &cAdmins: &f%{clan::admins::%{clan::%player's uuid%}%::*}%"
- send ""
- send "&7> &cMembers: &f%{clan::members::%{clan::%player's uuid%}%}%"
- send "&7> &cMember List: &f%{clan::memberlist::%{clan::%player's uuid%}%::*}%"
- send "&7> &cCoins: &f%{clan::coins::%{clan::%player's uuid%}%}%"
- else:
- send "{@P} You're not in a clan."
- else:
- set {_player} to (arg-2 parsed as player)
- set {_uuid} to {_player}'s uuid
- if {clan::%{_uuid}%} is set:
- send "{@P} Player&6 %{_player}%&f's clan information."
- send "&7> &cName: &f%{clan::%{_uuid}%}%"
- send "&7> &cOwner: &f%{clan::owner::%{clan::%{_uuid}%}%}%"
- send ""
- send "&7> &cMembers: &f%{clan::members::%{clan::%{_uuid}%}%}%"
- send "&7> &cCoins: &f%{clan::coins::%{clan::%{_uuid}%}%}%"
- else:
- send "{@P} &6%{_player}%&f is not in a clan."
- else if arg-1 is "delete":
- if {clan::%executor's uuid%} is set:
- if {clan::owner::%{clan::%executor's uuid%}%} = executor:
- send "{@P} Clan &6%{clan::%executor's uuid%}%&f deleted."
- remove {clan::%executor's uuid%} from {clan::names::*}
- delete {clan::owner::%{clan::%player's uuid%}%}
- delete {clan::coins::%{clan::%player's uuid%}%}
- delete {clan::admins::%{clan::%player's uuid%}%::*}
- delete {clan::members::%{clan::%player's uuid%}%}
- loop {clan::memberlist::%{clan::%player's uuid%}%::*}:
- set {_player} to loop-value parsed as player
- set {_uuid} to {_player}'s uuid
- delete {clan::%{_uuid}%}
- delete {clan::memberlist::%{clan::%player's uuid%}%::*}
- else:
- send "{@P} Only the clan owner can delete the clan."
- else:
- send "{@P} You are not in a clan."
- else if arg-1 is "invite":
- if {clan::%player's uuid%} is set:
- if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
- set {_player} to (arg-2 parsed as player)
- set {_uuid} to {_player}'s uuid
- if arg-2 is set:
- if {clan::memberlist::%{clan::%player's uuid%}%::*} does not contain {_player}:
- set {clans::request::%{_uuid}%} to {clan::%executor's uuid%}
- send "{@P} Invited &6%arg-2%&f to the clan." to executor
- send "{@P} You have been invited to join &6%{clan::%executor's uuid%}%&f." to {_player}
- else:
- send "{@P} This player is already in your clan."
- else:
- send "{@P} Enter a player."
- else:
- send "{@P} Only admins can invite players to a clan."
- else:
- send "{@P} You are not in a clan."
- else if arg-1 is "join":
- if {clan::%executor's uuid%} is not set:
- if {clans::request::%executor's uuid%} is set:
- set {clan::%executor's uuid%} to {clans::request::%executor's uuid%}
- add 1 to {clan::members::%{clan::%executor's uuid%}%}
- add "%executor%" to {clan::memberlist::%{clans::request::%executor's uuid%}%::*}
- send "{@P} You have joined &6%{clans::request::%executor's uuid%}%&f."
- loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
- send "{@P} &6%executor%&f has joined the clan." to loop-value parsed as player
- wait 3 ticks
- delete {clans::request::%executor's uuid%}
- else:
- send "{@P} You have no pending requests."
- else:
- send "{@P} You are already in a clan."
- else if arg-1 is "promote":
- if {clan::%executor's uuid%} is set:
- if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
- set {_player} to (arg-2 parsed as player)
- set {_uuid} to {_player}'s uuid
- if {clan::admins::%{clan::%player's uuid%}%::*} does not contain {_player}:
- if arg-2 is set:
- add "%{_player}%" to {clan::admins::%{clan::%executor's uuid%}%::*}
- loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
- send "{@P} &6%{_player}%&f has been made an admin in the clan." to loop-value parsed as player
- else:
- send "{@P} Enter a player."
- else:
- send "{@P} This player is already an admin."
- else if arg-1 is "demote":
- if {clan::%executor's uuid%} is set:
- if arg-2 is set:
- if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
- set {_player} to (arg-2 parsed as player)
- set {_uuid} to {_player}'s uuid
- if {clan::owner::%{clan::%player's uuid%}%} is not {_player}:
- if {clan::admins::%{clan::%player's uuid%}%::*} contains {_player}:
- remove "%{_player}%" from {clan::admins::%{clan::%executor's uuid%}%::*}
- loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
- send "{@P} &6%{_player}%&f has been demoted in the clan." to loop-value parsed as player
- else:
- send "{@P} This player is not an admin."
- else:
- send "{@P} You can not demote the owner."
- else:
- send "{@P} Only admins can make another player admin."
- else:
- send "{@P} Enter a player."
- else:
- send "{@P} You're not in a clan."
- else if arg-1 is "kick":
- if {clan::%executor's uuid%} is set:
- if arg-2 is set:
- if {clan::admins::%{clan::%player's uuid%}%::*} contains executor:
- set {_player} to (arg-2 parsed as player)
- set {_uuid} to {_player}'s uuid
- if {clan::memberlist::%{clan::%player's uuid%}%::*} contains {_player}:
- loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
- send "{@P} &6%{_player}%&f has been kicked from the clan." to loop-value parsed as player
- remove "%{_player}%" from {clan::admins::%{clan::%executor's uuid%}%::*}
- remove "%{_player}%" from {clan::memberlist::%{clan::%executor's uuid%}%::*}
- remove 1 from {clan::members::%{clan::%player's uuid%}%}
- delete {clan::%{_uuid}%}
- else:
- send "{@P} This user is not in the clan"
- else:
- send "{@P} Only admins can kick members."
- else:
- send "{@P} Enter a player."
- else:
- send "{@P} You're not in a clan."
- else if arg-1 is "leave":
- if {clan::%executor's uuid%} is set:
- loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
- send "{@P} &6%executor%&f has left the clan." to loop-value parsed as player
- send "{@P} &fYou have left the clan." to player
- wait 3 ticks
- remove "%executor%" from {clan::memberlist::%{clan::%executor's uuid%}%::*}
- remove 1 from {clan::members::%{clan::%player's uuid%}%}
- remove "%executor%" from {clan::admins::%{clan::%executor's uuid%}%::*}
- delete {clan::%executor's uuid%}
- else:
- send "{@P} You're not in a clan."
- else if arg-1 is "chat":
- if {clan::%executor's uuid%} is set:
- if {clan::chat::%player's uuid%} is not set:
- set {clan::chat::%player's uuid%} to true
- send "{@P} Clan chat &aenabled&f."
- else:
- delete {clan::chat::%player's uuid%}
- send "{@P} Clan chat &cdisabled&f."
- else:
- send "{@P} You're not in a clan."
- else if arg-1 is "admin":
- if player has permission "clans.admin":
- if arg-2 is "delete":
- if arg-3 is set:
- loop {clan::memberlist::%arg-3%::*}:
- set {_player} to loop-value parsed as player
- set {_uuid} to {_player}'s uuid
- delete {clan::%{_uuid}%}
- remove arg-3 from {clan::names::*}
- delete {clan::owner::%arg-3%}
- delete {clan::coins::%arg-3%}
- delete {clan::admins::%arg-3%::*}
- delete {clan::members::%arg-3%}
- delete {clan::memberlist::%arg-3%::*}
- send "{@P} Clan &6%arg-3%&f deleted."
- delete {clan::%arg-3%}
- else:
- send "{@P} Enter a clan name to delete."
- else if arg-2 is "add":
- if arg-3 is set:
- add arg-3 to {clan::names::*}
- send "{@P} Added &6%arg-3%&f to the name filter."
- else:
- send "{@P} Enter a name to add from the name filter."
- else if arg-2 is "remove":
- if arg-3 is set:
- remove arg-3 from {clan::names::*}
- send "{@P} Removed &6%arg-3%&f from the name filter."
- else:
- send "{@P} Enter a name to remove from the name filter."
- else:
- send ""
- send "&7>&c /clan admin arguments"
- send "&7>&c (required)&7, &c[optional]"
- send ""
- send "&7>&f filter (add|remove) (name) &7&O- Add or remove a name from the name filter."
- send "&7>&f delete (clan name) &7&O- Delete a clan."
- else:
- send "{@P} You are lacking the permission ""clans.admin""."
- else:
- send ""
- send "&7>&c /clan arguments"
- send "&7>&c (required)&7, &c[optional]"
- send "&7>&c Version: 1.2.2 - Patch"
- send ""
- send "&7>&f create (name) &7&O- Create your clan."
- send "&7>&f delete &7&O- Delete your clan."
- send "&7>&f info [name]&7&O- Your or another player's clan info."
- send "&7>&f join &7&O- Accept an invitation."
- send "&7>&f leave &7&O- Leave your current clan."
- send ""
- send "&cAdmin Commands &7You must have admin role in your clan."
- send ""
- send "&7>&f invite (player) &7&O- Invite a player."
- send "&7>&f kick (player) &7&O- Kick a player from the clan."
- send "&7>&f promote (player) &7&O- Promote a player to admin."
- send "&7>&f demote (player) &7&O- Revoke an admin rank."
- send ""
- send "&cClan Admin Control &7You must have the permission ""clans.admin""."
- send ""
- send "&7>&f For all commands, &6/clan admin&f."
- on chat:
- if {clan::chat::%player's uuid%} is true:
- cancel event
- loop {clan::memberlist::%{clan::%executor's uuid%}%::*}:
- send "{@P} &b[CHAT] &f%event-player%: %message%" to loop-value parsed as player
- on damage:
- if {clan::memberlist::%{clan::%eattacker's uuid%}%::*} contains victim:
- cancel event
- send "{@P} You can't attack a clan member!"
Advertisement
Add Comment
Please, Sign In to add comment