diff --git a/homepage/main.py b/homepage/main.py index cf41c9f..8dbf7d6 100644 --- a/homepage/main.py +++ b/homepage/main.py @@ -55,8 +55,12 @@ def currentPlayerData(): player["count"]["current"] = status.players.online player["count"]["max"] = status.players.max player["players"] = [] - for p in status.players.sample: - player["players"].append({"name": p.name, "uuid": p.id}) + try: + for p in status.players.sample: + player["players"].append({"name": p.name, "uuid": p.id}) + except TypeError: + # If nobody is online, status.players.sample is None + pass return player def fetchSkin(uuid):