Don't try to remove players not in the player list

Fixes #47
master
Tristan Gosselin-Hane 6 years ago
parent 6701641f03
commit d7567def4f
No known key found for this signature in database
GPG Key ID: 0B7E55B60DCA15D5
  1. 3
      minecraft_discord_bridge/minecraft_discord_bridge.py

@ -717,7 +717,8 @@ class MinecraftDiscordBridge():
for webhook in self.webhooks: for webhook in self.webhooks:
requests.post(webhook, json=webhook_payload) requests.post(webhook, json=webhook_payload)
del self.uuid_cache[action.uuid] del self.uuid_cache[action.uuid]
del self.player_list[action.uuid] if action.uuid in self.player_list:
del self.player_list[action.uuid]
if self.config.es_enabled: if self.config.es_enabled:
self.es_logger.log_connection( self.es_logger.log_connection(
uuid=action.uuid, reason=ConnectionReason.DISCONNECTED, count=len(self.player_list)) uuid=action.uuid, reason=ConnectionReason.DISCONNECTED, count=len(self.player_list))

Loading…
Cancel
Save