Enabled friends module, added friends check in imbusy, fixed small mistakes

This commit is contained in:
Dico200
2016-05-28 22:18:27 +02:00
parent 89e3982a29
commit 7a905643eb
3 changed files with 58 additions and 22 deletions

View File

@@ -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