Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /friends [<text>] [<player>]:
- aliases: friend
- executable by: player
- trigger:
- if text arg 1 is not set:
- if player arg 1 is not set:
- send "&6/friends add (name) &aSend a request to become friends with someone!"
- send "&6/friends accept (name) &aAccept a friend request!"
- send "&6/friends deny (name) &aDeny a friend request!"
- send "&6/friends list &aList your current friends!"
- send "&6/friends requests &aSee the people requesting to be friends with you!"
- send "&6/friends remove (name) &aRemove a friend from your friends list!"
- send "&cCredit To &aSlimeDoesStuff&c."
- if text arg 1 is "add":
- if player arg 1 is set:
- if player arg 1 is not "%player%":
- if {%UUID of player%.requested.%UUID of player arg 1%} is not set:
- if {%UUID of player%.friends.%UUID of player arg 1%} is not set:
- set {%UUID of player%.requested.%UUID of player arg 1%} to true
- add player to {%UUID of player arg 1%.requests::*}
- send "&aYou sent a friend request to &6%player arg 1%"
- send "&6%player% &asent you a friend request. Accept their request with &6/friends accept %player% &aor deny it with &6/friends deny %player%" to player arg 1
- play raw sound "random.pop" at player with pitch 1 volume 10
- else:
- send "&6%player arg 1% &cis already in your friends list."
- else:
- send "&cYou have already send a request to &6%player arg 1%&c."
- else:
- send "&cYou can't add your self."
- else:
- send "&cUse the command like this&7: &6/friends add (name)"
- if text arg 1 is "accept":
- if player arg 1 is set:
- if player arg 1 is not "%player%":
- if {%UUID of player%.friends.%UUID of player arg 1%} is not set:
- if {%UUID of player arg 1%.requested.%UUID of player%} is set:
- set {%UUID of player arg 1%.friends.%UUID of player%} to true
- set {%UUID of player%.friends.%UUID of player arg 1%} to true
- add player arg 1 to {%UUID of player%.friends::*}
- add player to {%UUID of player arg 1%.friends::*}
- remove player arg 1 from {%UUID of player%.requests::*}
- send "&aYou accepted the friend request sent by &6%player arg 1%&a!"
- send "&6%player% &aaccept your friend request!" to player arg 1
- play raw sound "random.pop" at player with pitch 1 volume 10
- else:
- send "&6%player arg 1% &cdidn't send you a request."
- else:
- send "&cThis person is already your friend."
- else:
- send "&cYou can't accept your self."
- else:
- send "&cUse the command like this&7: &6/friends add (name)"
- if text arg 1 is "deny":
- if player arg 1 is set:
- if player arg 1 is not "%player%":
- if {%UUID of player%.friends.%UUID of player arg 1%} is not set:
- if {%UUID of player arg 1%.requested.%UUID of player%} is set:
- delete {%UUID of player arg 1%.requested.%UUID of player%}
- remove player arg 1 from {%UUID of player%.requests::*}
- send "&cYou denied the friend request sent by &6%player arg 1%&c!"
- send "&6%player% &cdenied your friend request!" to player arg 1
- play raw sound "random.pop" at player with pitch 1 volume 10
- else:
- send "&6%player arg 1% &cdidn't send you a request."
- else:
- send "&cThis person is your friend."
- else:
- send "&cYou can't deny your self."
- else:
- send "&cUse the command like this&7: &6/friends deny (name)"
- if text arg 1 is "list":
- if player arg 1 is not set:
- send "&5&m------------------------------"
- send "&bYour friends:"
- loop {%UUID of player%.friends::*}:
- send "&a%loop-value%"
- send "&5&m------------------------------"
- else:
- send "&cUse the command like this&7: &6/friends list"
- if text arg 1 is "requests":
- if player arg 1 is not set:
- send "&5&m------------------------------"
- send "&bPending requests:"
- loop {%UUID of player%.requests::*}:
- send "&a%loop-value%"
- send "&5&m------------------------------"
- else:
- send "&cUse the command like this&7: &6/friends list"
- if text arg 1 is "remove":
- if player arg 1 is set:
- if player arg 1 is not "%player%":
- if {%UUID of player%.friends.%UUID of player arg 1%} is set:
- delete {%UUID of player arg 1%.friends.%UUID of player%}
- delete {%UUID of player%.friends.%UUID of player arg 1%}
- remove player arg 1 from {%UUID of player%.friends::*}
- remove player from {%UUID of player arg 1%.friends::*}
- send "&cYou removed &6%player arg 1% &cfrom your friends list!"
- send "&6%player% &cremoved you from his friends list!" to player arg 1
- play raw sound "random.pop" at player with pitch 1 volume 10
- else:
- send "&cThis person is not your friend."
- else:
- send "&cYou can't remove your self."
- else:
- send "&cUse the command like this&7: &6/friends remove (name)"
- on join:
- loop {%UUID of player%.friends::*}:
- send "&aYour friend %player% joined the server!" to loop-value
- on quit:
- loop {%UUID of player%.friends::*}:
- send "&4Your friend %player% left the server!" to loop-value
Add Comment
Please, Sign In to add comment