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