Skip to content

Commit

Permalink
feat: update player join/quit log messages
Browse files Browse the repository at this point in the history
Modified the log messages for player join and quit events. The log now also includes the player's address and port, along with their unique ID.
  • Loading branch information
wu-vincent committed Apr 26, 2024
1 parent a7d2d3d commit 778ce1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/endstone_example/example_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ def on_server_list_ping(self, event: ServerListPingEvent):
@event_handler
def on_player_join(self, event: PlayerJoinEvent):
player = event.player
self._plugin.logger.info(ColorFormat.YELLOW + f"{player.name} ({player.unique_id}) joins the game.")
self._plugin.logger.info(
ColorFormat.YELLOW
+ f"{player.name}[/{player.address}:{player.port}] joined the game with UUID {player.unique_id}"
)

@event_handler
def on_player_quit(self, event: PlayerQuitEvent):
player = event.player
self._plugin.logger.info(ColorFormat.YELLOW + f"{player.name} ({player.unique_id}) leaves the game.")
self._plugin.logger.info(ColorFormat.YELLOW + f"{player.name}[/{player.address}:{player.port}] left the game.")

0 comments on commit 778ce1d

Please sign in to comment.