Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Prefix: &cFriend &8»
- WarnPrefix: &cFriend &8»
- command /f [<text>] [<player>]:
- aliases: /friends
- trigger:
- if arg 1 is not set:
- message " " to player
- message "&8&m---------------&cFRIEND HELP&8&m---------------" to player
- message "&a/friend add <Player> &r&8»&7 Add a friend" to player
- message "&a/friend remove <Player> &r&8»&7 Remove a friend" to player
- message "&a/friend list &r&8»&7 List List of your friends" to player
- message "&8&m---------------&8&m---------------&8&m----------" to player
- message " " to player
- if arg 1 is "invite" or "add" or "accept":
- if player-arg is set:
- if player-arg is not player:
- if {friend.%uuid of player%::*} contains "%player-arg%":
- message "{@WarnPrefix} &7You are already friends with %player-arg%!" to player
- stop
- if {friend.attente.%uuid of player%} is set:
- add player to {friend.%{friend.attente.%uuid of player%}%::*}
- add player to {friend.%uuid of player-arg%::*}
- add player-arg to {friend.%uuid of player%::*}
- message "{@Prefix} &bYou are now friends with &b%player-arg%" to player
- message "{@Prefix} &bYou are now friends with &b%player%" to player-arg
- wait 1 tick
- delete {friend.attente.%uuid of player%}
- else:
- set {friend.attente.%uuid of player-arg%} to player
- message "&8&m---------------&8&m---------------&8&m----------" to player-arg
- message "&a%player% &basked you as a friend" to player-arg
- message "&aFor accept, execute: &3/friend add &b%player%" to player-arg
- message "&8&m---------------&8&m---------------&8&m----------" to player-arg
- message "{@Prefix} &bInvitation sent &d%player-arg%" to player
- else:
- message "{@WarnPrefix} &7You can not be friends with your self!" to player
- else:
- message "{@Prefix} &7Who do you want to add as a friend?" to player
- if arg 1 is "remove" or "delete":
- if player-arg is set:
- if player-arg is not player:
- if {friend.%uuid of player%::*} contains "%player-arg%":
- remove player-arg from {friend.%uuid of player%::*}
- remove player from {friend.%uuid of player-arg%::*}
- message "&3You are not friends with &d%player-arg% &3!" to player
- message "&3You are not friends with &d%player% &3!" to player-arg
- else:
- message "&7You are not friends with this player!" to player
- stop
- if arg 1 is "list":
- loop {friend.%uuid of player%::*}:
- if loop-value is online:
- add loop-value to {_online::*}
- if loop-value is offline:
- add loop-value to {_offline::*}
- message "&aOnline: &7%{_online::*}%" to player
- message "&cOffline: &7%{_offline::*}%" to player
Add Comment
Please, Sign In to add comment