From 5cb741711529c17a39965ba04623623df313eb8b Mon Sep 17 00:00:00 2001 From: Vincent Date: Sat, 4 May 2024 16:38:43 +0100 Subject: [PATCH] refactor: datetime import in example_listener.py --- src/endstone_example/example_listener.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endstone_example/example_listener.py b/src/endstone_example/example_listener.py index 4f1d2e0..6d62b09 100644 --- a/src/endstone_example/example_listener.py +++ b/src/endstone_example/example_listener.py @@ -1,4 +1,4 @@ -from datetime import datetime +import datetime from endstone import ColorFormat from endstone.event import event_handler, EventPriority, PlayerJoinEvent, PlayerQuitEvent, ServerListPingEvent @@ -11,7 +11,7 @@ def __init__(self, plugin: Plugin): @event_handler(priority=EventPriority.HIGHEST) def on_server_list_ping(self, event: ServerListPingEvent): - event.motd = ColorFormat.BOLD + ColorFormat.AQUA + datetime.now().strftime("%c") + event.motd = ColorFormat.BOLD + ColorFormat.AQUA + datetime.datetime.now().strftime("%c") event.level_name = f"Your IP is {ColorFormat.YELLOW}{event.remote_host}:{event.remote_port}{ColorFormat.RESET}" @event_handler