Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # _ _ _
- # / \ __| |_ ____ _ _ __ ___ ___ __| |
- # / _ \ / _` \ \ / / _` | '_ \ / __/ _ \/ _` |
- # / ___ \ (_| |\ V / (_| | | | | (_| __/ (_| |
- # /_/ \_\__,_| \_/ \__,_|_| |_|\___\___|\__,_|
- # _____ _ _
- # | ___| __(_) ___ _ __ __| |___
- # | |_ | '__| |/ _ \ '_ \ / _` / __|
- # | _|| | | | __/ | | | (_| \__ \
- # |_| |_| |_|\___|_| |_|\__,_|___/
- # A PROJECT BY LEVENCE
- # License: GNU General Public License Version 3 (GPLv3)
- on join:
- delete {LastMSG::%player%}
- delete {_FriendsOnlineList::%player%::*}
- set {SpielerName.%player%} to player's name
- set {db_.UUID.%player%} to player
- set {LastOnlineFriends::%player%.Data} to now
- If {db_.FriendsAsk::%player%.Number} is bigger than 0:
- If {db_.FriendsAsk::%player%.Number} is bigger than 1:
- message "&4│ &cFreunde &4» &6Du hast &3%{db_.FriendsAsk::%player%.Number}% &6neue Freundschaftsanfragen"
- else:
- message "&4│ &cFreunde &4» &6Du hast &3%{db_.FriendsAsk::%player%.Number}% &6neue Freundschaftsanfrage"
- loop all players:
- loop {db_.Friends::%player%::*}:
- If loop-value-1 is loop-player:
- If {FriendsOptions::%loop-value-1%.Notify} is not set:
- send "&4│ &cFreunde &4» &a%player% ist nun online" to loop-player
- add loop-player to {_FriendsOnlineList::%player%::*}
- If {_FriendsOnlineList::%player%::*} is not set:
- message ""
- message "&4│ &cFreunde &4»"
- message "&4│ &6Online: &cNiemand :/"
- message ""
- message ""
- else:
- message ""
- message "&4│ &cFreunde &4»"
- message "&4│ &6Online: &a%{_FriendsOnlineList::%player%::*}%"
- message ""
- message ""
- on load:
- delete {AlreadyLeft::*}
- on quit:
- If {AlreadyLeft::%player%} is not set:
- set {AlreadyLeft::%player%} to "1"
- delete {LastMSG::%{db_.UUID.%{LastMSG::%player%}%}%}
- delete {LastMSG::%player%}
- set {LastOnlineFriends::%player%.Data} to now
- loop all players:
- loop {db_.Friends::%player%::*}:
- If loop-value-1 is loop-player:
- If {FriendsOptions::%loop-value-1%.Notify} is not set:
- send "&4│ &cFreunde &4» &c%player% ist nun offline" to loop-player
- wait 2 seconds
- delete {AlreadyLeft::%player%}
- on damage:
- If attacker is a player:
- If victim is a player:
- If {FriendsNoDamage::%attacker%::%victim%} is set:
- cancel event
- on inventory click:
- If inventory name of player's current inventory is "&6Freunde":
- cancel event
- set {_FriendsAsk5.%player%} to clicked slot
- set {_FriendsAsk5.%player%.Name} to name of slot {_FriendsAsk5.%player%} of player's current inventory
- replace all "&a" and "&8" in {_FriendsAsk5.%player%.Name} with ""
- If {db_.Friends::%player%::%{db_.UUID.%{_FriendsAsk5.%player%.Name}%}%} is set:
- set {FriendsCurrentShow::%player%} to {_FriendsAsk5.%player%.Name}
- make console execute command "/Friends:API %player% Options %{FriendsCurrentShow::%player%}% Open"
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- else:
- If inventory name of player's current inventory contains "Annehmen?":
- cancel event
- If clicked slot is 0:
- set {_FriendsAsk3.%player%} to clicked slot
- set {_FriendsAsk3.%player%.Name} to name of slot {_FriendsAsk3.%player%} of player's current inventory
- If {_FriendsAsk3.%player%.Name} is "&a✔ Annehmen":
- make console execute command "/Friends:API %player% State %{FriendsCurrentShow::%player%}% Accept"
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- close player's inventory
- If clicked slot is 8:
- set {_FriendsAsk3.%player%} to clicked slot
- set {_FriendsAsk3.%player%.Name} to name of slot {_FriendsAsk3.%player%} of player's current inventory
- If {_FriendsAsk3.%player%.Name} is "&4✖ Ablehnen":
- make console execute command "/Friends:API %player% State %{FriendsCurrentShow::%player%}% Deny"
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- close player's inventory
- else:
- If inventory name of player's current inventory is "&cFreundschaftsanfragen":
- cancel event
- If clicked slot is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 or 26:
- set {_FriendsAsk2.%player%} to clicked slot
- set {_FriendsAsk2.%player%.Name} to name of slot {_FriendsAsk2.%player%} of player's current inventory
- set {_FriendsAsk2.%player%.Item} to type of slot {_FriendsAsk2.%player%} of player's current inventory
- If {_FriendsAsk2.%player%.Item} is player head:
- If {db_.FriendsAsk::%player%::List::%{db_.UUID.%{_FriendsAsk2.%player%.Name}%}%} is set:
- make console execute command "/Friends:API %player% State %{_FriendsAsk2.%player%.Name}% Open"
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- set {FriendsCurrentShow::%player%} to {_FriendsAsk2.%player%.Name}
- else:
- If inventory name of player's current inventory contains "- Optionen":
- cancel event
- set {_FriendsAsk6.%player%} to clicked slot
- set {_FriendsAsk6.%player%.Name} to name of slot {_FriendsAsk6.%player%} of player's current inventory
- set {_FriendsAsk6.%player%.Item} to type of slot {_FriendsAsk6.%player%} of player's current inventory
- If {_FriendsAsk6.%player%.Name} is "&bZurück":
- If {_FriendsAsk6.%player%.Item} is slimeball:
- close player's inventory
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- wait 1 tick
- make player execute command "/friends"
- If {_FriendsAsk6.%player%.Name} contains "&aDu fügst":
- If {_FriendsAsk6.%player%.Item} is light green wool:
- set {FriendsNoDamage::%player%::%{db_.UUID.%{FriendsCurrentShow::%player%}%}%} to {db_.UUID.%{FriendsCurrentShow::%player%}%}
- set slot 1 of player's current inventory to red wool named "&cDu fügst %{FriendsCurrentShow::%player%}% kein Schaden zu"
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- If {_FriendsAsk6.%player%.Name} contains "&cDu fügst":
- If {_FriendsAsk6.%player%.Item} is red wool:
- delete {FriendsNoDamage::%player%::%{db_.UUID.%{FriendsCurrentShow::%player%}%}%}
- set slot 1 of player's current inventory to light green wool named "&aDu fügst %{FriendsCurrentShow::%player%}% Schaden zu"
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- If {_FriendsAsk6.%player%.Name} is "&4Freund entfernen":
- If {_FriendsAsk6.%player%.Item} is red dye:
- #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
- make console execute command "/Friends:API %player% State %{FriendsCurrentShow::%player%}% Remove"
- make player execute command "/friends"
- command /friends:API [<player>] [<text>] [<offlineplayer>] [<text>]:
- executable by: console
- trigger:
- If arg-2 is "Anfragen":
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- open chest with 6 rows named "&cFreundschaftsanfragen" to arg-1
- loop {db_.FriendsAsk::%arg-1%::List::*}:
- If {db_.FriendsAsk::%arg-1%::List::%loop-value%} is not set:
- remove loop-value from {db_.FriendsAsk::%arg-1%::List::*}
- else:
- loop 27 times:
- If slot loop-number -1 of arg-1's current inventory is air:
- set {_FriendsAsk.%loop-value-1%.%arg-1%} to {SpielerName.%loop-value-1%} parsed as offline player
- format slot loop-number -1 of arg-1 with {_FriendsAsk.%loop-value-1%.%arg-1%}'s skull named "%{SpielerName.%loop-value-1%}%" to be unstealable
- stop loop
- If arg-2 is "Anfragen_Keine":
- #make console execute command "/playsound note.bass %arg-1% ~0 ~0 ~0 10 1"
- If arg-2 is "State":
- If arg-4 is "Open":
- set {_skull.%arg-1%} to "%arg-3%" parsed as offline player
- open chest with 1 row named "&e%arg-3% - Annehmen?" to arg-1
- format slot 0 of arg-1 with light green wool named "&a✔ Annehmen" to be unstealable
- format slot 4 of arg-1 with {_skull.%arg-1%}'s skull named "%arg-3%" to be unstealable
- format slot 8 of arg-1 with red wool named "&4✖ Ablehnen" to be unstealable
- If arg-4 is "Accept":
- If {db_.FriendsComplete::%arg-1%.Number} is smaller than 17:
- remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
- delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
- add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
- set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
- add 1 to {db_.FriendsComplete::%arg-1%.Number}
- set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
- #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
- loop all players:
- If "%arg-3%" is "%loop-player%":
- loop-player is not "%arg-1%"
- #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
- else:
- If arg-player does not have permission "AF.LimitBypass.1", "AF.LimitBypass.2" or "AF.LimitBypass.3":
- send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
- else:
- If {db_.FriendsComplete::%arg-1%.Number} is smaller than 24:
- remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
- delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
- add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
- set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
- add 1 to {db_.FriendsComplete::%arg-1%.Number}
- set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
- #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
- loop all players:
- If "%arg-3%" is "%loop-player%":
- loop-player is not "%arg-1%"
- #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
- else:
- If arg-player does not have permission "AF.LimitBypass.2" or "AF.LimitBypass.3":
- send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
- else:
- If {db_.FriendsComplete::%arg-1%.Number} is smaller than 29:
- remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
- delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
- add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
- set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
- add 1 to {db_.FriendsComplete::%arg-1%.Number}
- set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
- #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
- loop all players:
- If "%arg-3%" is "%loop-player%":
- loop-player is not "%arg-1%"
- #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
- else:
- If arg-player does not have permission "AF.LimitBypass.3":
- send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
- else:
- If {db_.FriendsComplete::%arg-1%.Number} is smaller than 35:
- remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
- delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
- add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
- set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
- add 1 to {db_.FriendsComplete::%arg-1%.Number}
- set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
- #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
- loop all players:
- If "%arg-3%" is "%loop-player%":
- loop-player is not "%arg-1%"
- #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
- send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
- else:
- send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
- If arg-4 is "Deny":
- remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
- delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
- send "&4│ &cFreunde &4» &cDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &cabgelehnt" to arg-1
- loop all players:
- If "%arg-3%" is "%loop-player%":
- loop-player is not "%arg-1%"
- send "&4│ &cFreunde &4» &6%arg-1% &chat deine Freundschaftsanfrage abgelehnt" to loop-player
- If arg-4 is "Remove":
- remove 1 from {db_.Friends::%{db_.UUID.%arg-3%}%.Number}
- delete {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%}
- remove 1 from {db_.Friends::%arg-1%.Number}
- delete {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%}
- delete {db_.FriendsAsk::%{db_.UUID.%arg-1%}%::List::%arg-3%}
- delete {db_.FriendsAsk::%arg-3%::List::%{db_.UUID.%arg-1%}%}
- send "&4│ &cFreunde &4» &cDu hast &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &cvon deiner Freundesliste entfernt" to arg-1
- loop all players:
- If "%arg-3%" is "%loop-player%":
- loop-player is not "%arg-1%"
- send "&4│ &cFreunde &4» &6%arg-1% &chat dich von seiner Freundesliste entfernt" to loop-player
- If arg-2 is "Options":
- If arg-4 is "Open":
- set {_skull.%arg-1%} to "%arg-3%" parsed as offline player
- open chest with 1 row named "&e%arg-3% - Optionen" to arg-1
- format slot 4 of arg-1 with {_skull.%arg-1%}'s skull named "%arg-3%" to be unstealable
- set slot 8 of arg-1's current inventory to slimeball named "&bZurück"
- set slot 7 of arg-1's current inventory to red dye named "&4Freund entfernen"
- If {FriendsNoDamage::%arg-1%::%{db_.UUID.%arg-3%}%} is not set:
- set slot 1 of arg-1's current inventory to light green wool named "&aDu fügst %arg-3% Schaden zu"
- else:
- set slot 1 of arg-1's current inventory to red wool named "&cDu fügst %arg-3% kein Schaden zu"
- If arg-4 is "Notify":
- If {FriendsOptions::%arg-1%.Notify} is not set:
- set {FriendsOptions::%arg-1%.Notify} to "1"
- format slot 51 of arg-1 with red wool named "&cDu siehst keine Online/Offline Nachrichten" to run "Friends:API %arg-1% Options null Notify"
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- else:
- delete {FriendsOptions::%arg-1%.Notify}
- format slot 51 of arg-1 with light green wool named "&aDu siehst Online/Offline Nachrichten" to run "Friends:API %arg-1% Options null Notify"
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- If arg-4 is "Message":
- If {FriendsOptions::%arg-1%.Message} is not set:
- set {FriendsOptions::%arg-1%.Message} to "1"
- format slot 52 of arg-1 with red wool named "&cDu erhältst keine privaten Nachrichten" to run "Friends:API %arg-1% Options null Message"
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- else:
- delete {FriendsOptions::%arg-1%.Message}
- format slot 52 of arg-1 with light green wool named "&aDu erhältst private Nachrichten" to run "Friends:API %arg-1% Options null Message"
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- If arg-4 is "Receive":
- If {FriendsOptions::%arg-1%.Receive} is not set:
- set {FriendsOptions::%arg-1%.Receive} to "1"
- format slot 53 of arg-1 with red wool named "&cDu erhältst keine Freundschaftsanfragen" to run "Friends:API %arg-1% Options null Receive"
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- else:
- delete {FriendsOptions::%arg-1%.Receive}
- format slot 53 of arg-1 with light green wool named "&aDu erhältst Freundschaftsanfragen" to run "Friends:API %arg-1% Options null Receive"
- #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
- command /friends [<text>] [<text>]:
- aliases: f, friend
- executable by: player
- trigger:
- If arg-1 is not set:
- open chest with 6 rows named "&6Freunde" to player
- loop {db_.Friends::%player%::*}:
- delete {_FriendsOnline.%loop-value%.%player%}
- delete {_FriendsOffline.%loop-value%.%player%}
- If {db_.Friends::%player%::*} is set:
- loop {db_.Friends::%player%::*}:
- loop all players:
- If loop-value-1 is loop-player:
- set {_FriendsOnline.%loop-value-1%.%player%} to loop-value-1
- else:
- set {_FriendsOffline.%loop-value-1%.%player%} to loop-value-1
- If {_FriendsOnline.%loop-value%.%player%} is set:
- loop 36 times:
- If slot loop-number -1 of player's current inventory is air:
- set {_FriendsHead.%loop-value-1%.%player%} to {SpielerName.%{_FriendsOnline.%loop-value-1%.%player%}%} parsed as player
- set slot loop-number -1 of player's current inventory to {_FriendsHead.%loop-value-1%.%player%}'s skull named "&a%{SpielerName.%{_FriendsOnline.%loop-value-1%.%player%}%}%" with lore "&fOnline"
- stop loop
- else:
- loop 36 times:
- If slot loop-number -1 of player's current inventory is air:
- set slot loop-number -1 of player's current inventory to skeleton head named "&8%{SpielerName.%{_FriendsOffline.%loop-value-1%.%player%}%}%" with lore "&7Offline||&f&m------------------||&6 ⌚ Zuletzt Online:||&6 %{LastOnlineFriends::%{db_.UUID.%{SpielerName.%{_FriendsOffline.%loop-value-1%.%player%}%}%}%.Data}%"
- stop loop
- else:
- set slot 0 of player's current inventory to Map:2 named "&cDu hast noch keine Freunde. :(" with lore "&f&oHilfe unter /friends help"
- If {db_.FriendsAsk::%player%.Number} is not set:
- set {db_.FriendsAsk::%player%.Number} to 0
- If {db_.FriendsComplete::%player%.Number} is not set:
- set {db_.FriendsComplete::%player%.Number} to 0
- format slot 36 of player with black glass pane named " " to be unstealable
- format slot 37 of player with black glass pane named " " to be unstealable
- format slot 38 of player with black glass pane named " " to be unstealable
- format slot 39 of player with black glass pane named " " to be unstealable
- format slot 40 of player with black glass pane named " " to be unstealable
- format slot 41 of player with black glass pane named " " to be unstealable
- format slot 42 of player with black glass pane named " " to be unstealable
- format slot 43 of player with black glass pane named " " to be unstealable
- format slot 44 of player with black glass pane named " " to be unstealable
- If {db_.FriendsAsk::%player%.Number} is bigger than 0:
- format slot 45 of player with glowing ender chest named "&3Freundschaftsanfragen &f(%{db_.FriendsAsk::%player%.Number}%)" to run "Friends:API %player% Anfragen"
- else:
- format slot 45 of player with chest named "&3Freundschaftsanfragen &f(0)" to run "Friends:API %player% Anfragen_Keine"
- If {FriendsOptions::%player%.Notify} is not set:
- format slot 51 of player with light green wool named "&aDu siehst Online/Offline Nachrichten" to run "Friends:API %player% Options null Notify"
- else:
- format slot 51 of player with red wool named "&cDu siehst keine Online/Offline Nachrichten" to run "Friends:API %player% Options null Notify"
- If {FriendsOptions::%player%.Message} is not set:
- format slot 52 of player with light green wool named "&aDu erhältst private Nachrichten" to run "Friends:API %player% Options null Message"
- else:
- format slot 52 of player with red wool named "&cDu erhältst keine privaten Nachrichten" to run "Friends:API %player% Options null Message"
- If {FriendsOptions::%player%.Receive} is not set:
- format slot 53 of player with light green wool named "&aDu erhältst Freundschaftsanfragen" to run "Friends:API %player% Options null Receive"
- else:
- format slot 53 of player with red wool named "&cDu erhältst keine Freundschaftsanfragen" to run "Friends:API %player% Options null Receive"
- else:
- If arg-1 is not "add" or "remove" or "accept" or "deny" or "debug":
- message ""
- message "&4│ &cFreunde &4»"
- send "&4│ &fEinen Freund hinzufügen: &6/friends add <Name>"
- send "&4│ &fEinen Freund entfernen: &6/friends remove <Name>"
- send "&4│ &fEine Anfrage annehmen: &6/friends accept <Name>"
- send "&4│ &fEine Anfrage ablehnen: &6/friends deny <Name>"
- message ""
- else:
- If arg-1 is "add":
- If arg-2 is not set:
- message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
- else:
- If arg-2 is player:
- message "&4│ &cFreunde &4» &cDu kannst dir selber keine Freundschaftsanfrage senden"
- else:
- If {db_.UUID.%arg-2%} is not set:
- message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
- else:
- If {db_.Friends::%{db_.UUID.%arg-2%}%::%player%} is set:
- message "&4│ &cFreunde &4» &cDu bist schon mit diesem Spieler befreundet"
- else:
- If {db_.FriendsAsk::%player%::List::%{db_.UUID.%arg-2%}%} is set:
- message "&4│ &cFreunde &4» &cDieser Spieler hat dir schon eine Freundschaftsanfrage gesendet"
- else:
- If {db_.FriendsAsk::%{db_.UUID.%arg-2%}%::List::%player%} is set:
- message "&4│ &cFreunde &4» &cDu hast diesem Spieler schon eine Freundschaftsanfrage gesendet"
- else:
- If {FriendsOptions::%{db_.UUID.%arg-2%}%.Receive} is set:
- message "&4│ &cFreunde &4» &cDieser Spieler nimmt keine Freundschaftsanfragen an"
- else:
- If {db_.FriendsAsk::%{db_.UUID.%arg-2%}%.Number} is bigger than 26:
- message "&4│ &cFreunde &4» &cDieser Spieler hat das maximale Limit an Freundschaftsanfragen erreicht"
- else:
- add 1 to {db_.FriendsAsk::%{db_.UUID.%arg-2%}%.Number}
- set {db_.FriendsAsk::%{db_.UUID.%arg-2%}%::List::%player%} to player
- loop all players:
- If loop-player is arg-2:
- #make console execute command "/playsound tile.piston.out %loop-player% ~0 ~0 ~0 10 1"
- send "" to loop-player
- send "&4│ &cFreunde &4»" to loop-player
- send "&4│ &6Du hast eine Freundschaftsanfrage von &a%player% &6erhalten" to loop-player
- send "&4│ » &a✔ Annehmen"
- send "&4│ » &c✖ Ablehnen"
- send "" to loop-player
- message "&4│ &cFreunde &4» &6Du hast &a%arg-2% &6eine Freundschaftsanfrage gesendet"
- #make console execute command "/playsound tile.piston.out %player% ~0 ~0 ~0 10 1"
- If arg-1 is "remove":
- If arg-2 is not set:
- message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
- else:
- If arg-2 is player:
- message "&4│ &cFreunde &4» &cDu kannst dich nicht als Freund entfernen"
- else:
- If {db_.UUID.%arg-2%} is not set:
- message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
- else:
- If {db_.Friends::%player%::%{db_.UUID.%arg-2%}%} is not set:
- message "&4│ &cFreunde &4» &cDu bist nicht mit diesem Spieler befreundet"
- else:
- make console execute command "/Friends:API %player% State %arg-2% Remove"
- If arg-1 is "accept":
- If arg-2 is not set:
- message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
- else:
- If arg-2 is player:
- message "&4│ &cFreunde &4» &cDu kannst dich nicht selber als Freund akzeptieren"
- else:
- If {db_.UUID.%arg-2%} is not set:
- message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
- else:
- If {db_.FriendsAsk::%player%::List::%{db_.UUID.%arg-2%}%} is not set:
- message "&4│ &cFreunde &4» &cDieser Spieler hat dir keine Freundschaftsanfrage gesendet"
- else:
- make console execute command "/Friends:API %player% State %arg-2% Accept"
- If arg-1 is "deny":
- If arg-2 is not set:
- message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
- else:
- If arg-2 is player:
- message "&4│ &cFreunde &4» &cDu kannst dich nicht selber als Freund ablehnen"
- else:
- If {db_.UUID.%arg-2%} is not set:
- message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
- else:
- If {db_.FriendsAsk::%player%::List::%{db_.UUID.%arg-2%}%} is not set:
- message "&4│ &cFreunde &4» &cDieser Spieler hat dir keine Freundschaftsanfrage gesendet"
- else:
- make console execute command "/Friends:API %player% State %arg-2% Deny"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement