Skip to content

Commit

Permalink
refactor: datetime import in example_listener.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed May 4, 2024
1 parent 30176a3 commit 5cb7417
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/endstone_example/example_listener.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
import datetime

from endstone import ColorFormat
from endstone.event import event_handler, EventPriority, PlayerJoinEvent, PlayerQuitEvent, ServerListPingEvent
Expand All @@ -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
Expand Down

0 comments on commit 5cb7417

Please sign in to comment.