Skip to content

Commit

Permalink
test: add tests for ServerListPingEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Sep 25, 2024
1 parent 6a24262 commit 21b1582
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/endstone_test/event_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def on_thunder_change(self, event: ThunderChangeEvent):
def on_weather_change(self, event: WeatherChangeEvent):
self._plugin.logger.info(f"Weather state changed to {event.to_weather_state}")

@event_handler
def on_server_list_ping(self, event: ServerListPingEvent):
event.motd = ColorFormat.BOLD + event.motd
event.level_name = ColorFormat.GREEN + "Endstone Test" + ColorFormat.RESET

@property
def server(self) -> Server:
return self._plugin.server

0 comments on commit 21b1582

Please sign in to comment.