Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /favorites [<text>] [<offline player>]:
- trigger:
- if arg 2 is not set:
- if arg 1 is not set:
- send "&e—————————&fHelp: Favorites&e————————————————————————"
- send "&6/favorites list:&f shows who is online and offline of your favorites&r"
- send "&6/favorites add [playername]:&f Adds a player to your favorites list&r"
- send "&6/favorites remove [playername]:&f Removes a player from your favorites list&r"
- if arg 1 is "add" or "a":
- if arg 2 is set:
- if file "/home/ubuntu/minecraft/plugins/Skript/playerdata/users/%arg 2%" doesn't exists:
- send "&cThat player has not joined the server!&r"
- stop trigger
- if file "/home/ubuntu/minecraft/plugins/Skript/playerdata/favorites/%{uuid:%player%}%/%{name:%arg 2%}%" exists:
- send "&eThis player is already a favorite!&r"
- stop trigger
- create file "/home/ubuntu/minecraft/plugins/Skript/playerdata/favorites/%{uuid:%player%}%/%{name:%arg 2%}%"
- send "&aFavorite added.&r"
- else:
- send "&2Who would you like me to add?&r"
- if arg 1 is "remove" or "rem" or "delete" or "del":
- if arg 2 is set:
- if file "/home/ubuntu/minecraft/plugins/Skript/playerdata/users/%arg 2%" doesn't exists:
- send "&cThat player has not joined the server!&r"
- stop trigger
- if file "/home/ubuntu/minecraft/plugins/Skript/playerdata/favorites/%{uuid:%player%}%/%{name:%arg 2%}%" doesn't exists:
- send "&eThis player is not a favorite!&r"
- stop trigger
- df "/home/ubuntu/minecraft/plugins/Skript/playerdata/favorites/%{uuid:%player%}%/%{name:%arg 2%}%"
- send "&cFavorite removed.&r"
- else:
- send "&2Who would you like me to delete?&r"
- if arg 1 is "list":
- send "&2——————&8==========================&2——————&r"
- send "&2———&8===========&2&lF&a&la&2&lv&a&lo&2&lr&a&li&2<&a&le&27&ls&8===========&2———&r"
- send "&2——————&8==========================&2——————&r"
- set {_fave::*} to files in "/home/ubuntu/minecraft/plugins/Skript/playerdata/favorites/%{uuid:%player%}%"
- loop {_fave::*}:
- add loop-value to {_favetotal::*}
- set {_text} to "%{_favetotal::*}%"
- replace all "and " with "," in {_text}
- send "%{_text}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement