Skip to content

Commit

Permalink
Improved logging readability
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Feb 9, 2022
1 parent d958b94 commit 990ad36
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class ConsoleLoggers(
return
}

plugin.logger.info("${event.boss.id} was spawned by ${event.spawner} at ${event.location}")
val location = "${event.location.world}: ${event.location.x}, ${event.location.y}, ${event.location.z}"

plugin.logger.info("&a${event.boss.id}&r was spawned by &a${event.spawner?.name}&r at &a$location")
}

@EventHandler(
Expand All @@ -32,7 +34,10 @@ class ConsoleLoggers(
return
}

plugin.logger.info("${event.boss.boss.id} was killed by ${event.killer} at ${event.boss.entity?.location}")
val loc = event.boss.entity?.location
val location = "${loc?.world}: ${loc?.x}, ${loc?.y}, ${loc?.z}"

plugin.logger.info("&a${event.boss.boss.id}&r was killed by &a${event.killer?.name}&r at &a$location")
}

@EventHandler(
Expand All @@ -43,7 +48,9 @@ class ConsoleLoggers(
if (!plugin.configYml.getBool("log-spawn-kill")) {
return
}
val loc = event.boss.entity?.location
val location = "${loc?.world}: ${loc?.x}, ${loc?.y}, ${loc?.z}"

plugin.logger.info("${event.boss.boss.id} despawned at ${event.boss.entity?.location}")
plugin.logger.info("&a${event.boss.boss.id}&r despawned at &a$location")
}
}

0 comments on commit 990ad36

Please sign in to comment.