Skip to content

Commit

Permalink
test: add actor type info to event logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Dec 23, 2024
1 parent 918b82f commit 09d1a50
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/endstone_test/event_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,24 @@ def on_player_death(self, event: PlayerDeathEvent):

@event_handler
def on_actor_death(self, event: ActorDeathEvent):
self._plugin.logger.info(f"{event.actor.name} died.")
self._plugin.logger.info(f"{event.actor.name} ({event.actor.type}) died.")

@event_handler
def on_actor_knockback(self, event: ActorKnockbackEvent):
self._plugin.logger.info(f"{event.actor.name} is knocked by {event.knockback}")
self._plugin.logger.info(f"{event.actor.name} ({event.actor.type}) is knocked by {event.knockback}")

@event_handler
def on_actor_removed(self, event: ActorRemoveEvent):
self._plugin.logger.info(f"{event.actor.name} is removed from the world.")
self._plugin.logger.info(f"{event.actor.name} ({event.actor.type}) is removed from the world.")

@event_handler
def on_actor_spawned(self, event: ActorSpawnEvent):
self._plugin.logger.info(f"{event.actor.name} just spawned.")
self._plugin.logger.info(f"{event.actor.name} ({event.actor.type}) just spawned.")

@event_handler
def on_actor_teleport(self, event: ActorTeleportEvent):
self._plugin.logger.info(
f"{event.actor.name} teleported from {event.from_location} to {event.to_location}"
f"{event.actor.name} ({event.actor.type}) teleported from {event.from_location} to {event.to_location}"
)

@event_handler
Expand Down

0 comments on commit 09d1a50

Please sign in to comment.