Skip to content

Commit bad0adc

Browse files
committed
Logger messages improved.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent c829361 commit bad0adc

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/home/commands/DelHomeCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object DelHomeCommand {
2222
private val logger = LogManager.getLogger()
2323

2424
fun register(dispatcher: CommandDispatcher<CommandSource>) {
25-
logger.info("Register \"/delhome\" command ...")
25+
logger.info("Register \"/delhome\" command")
2626
aliases.forEach { command ->
2727
dispatcher.register(
2828
literal<CommandSource>(command).executes {

src/main/kotlin/com/mairwunnx/projectessentials/home/commands/HomeCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object HomeCommand {
2525
private val logger = LogManager.getLogger()
2626

2727
fun register(dispatcher: CommandDispatcher<CommandSource>) {
28-
logger.info("Register \"/home\" command ...")
28+
logger.info("Register \"/home\" command")
2929
applyCommandAliases()
3030

3131
aliases.forEach { command ->

src/main/kotlin/com/mairwunnx/projectessentials/home/commands/SetHomeCommand.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,16 @@ object SetHomeCommand {
9696
)
9797
StorageBase.setData(playerUUID, HomeModel(homeModel))
9898
sendMsg("home", c.source, "home.set.success", homeName)
99-
logger.info("New home point for ${player.name.string} installed with data: ")
100-
logger.info(" - name: $homeName")
101-
logger.info(" - world / world id: $clientWorld / $worldId")
102-
logger.info(" - xpos: $xPos")
103-
logger.info(" - ypos: $yPos")
104-
logger.info(" - zpos: $zPos")
105-
logger.info(" - yaw: $yaw")
106-
logger.info(" - pitch: $pitch")
99+
logger.info(
100+
"\n" +
101+
"New home point for ${player.name.string} installed with data: \n" +
102+
" - name: $homeName\n" +
103+
" - world / world id: $clientWorld / $worldId\n" +
104+
" - xpos: $xPos\n" +
105+
" - ypos: $yPos\n" +
106+
" - zpos: $zPos\n" +
107+
" - pitch: $pitch"
108+
)
107109
logger.info("Executed command \"/sethome\" from ${player.name.string}")
108110
} else {
109111
sendMsg("home", c.source, "home.set.restricted")

0 commit comments

Comments
 (0)