summaryrefslogtreecommitdiff
path: root/friends.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2016-05-28 22:18:27 +0200
committerDico200 <dico.karssiens@gmail.com>2016-05-28 22:18:27 +0200
commit7a905643eb772fd15c9fbd92942655c66b8dff0d (patch)
treef35045882ca1428d6d5e01d3979c6e30ab7fd1b5 /friends.py
parent89e3982a299d94173704784438ac9393ebd6acaf (diff)
Enabled friends module, added friends check in imbusy, fixed small mistakesimbusy-reply-patch
Diffstat (limited to 'friends.py')
-rw-r--r--friends.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/friends.py b/friends.py
index 870560e..130954a 100644
--- a/friends.py
+++ b/friends.py
@@ -5,6 +5,10 @@ friends = open_json_file("friends", {}) # {Player_UUID:[List_of_friend
friend_join_sound = "random.orb"
+def is_friend_of(player, other):
+ lst = friends.get(uid(player))
+ return lst is not None and uid(other) in lst
+
@hook.event("player.PlayerJoinEvent", "high") # creates sound and sends a bold message on friend join
def fjm(event): # friend join message