From 221a6622f38f3e4dad206faaa8844cacfd8bf909 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Sun, 11 Feb 2024 21:47:49 -0500 Subject: [PATCH] Fix format parsing in /time (Fixes #5661) --- .../java/com/earth2me/essentials/commands/Commandtime.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandtime.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandtime.java index 848126fea..4e85d7b4c 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandtime.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandtime.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.CommandSource; +import com.earth2me.essentials.utils.AdventureUtil; import com.earth2me.essentials.utils.DescParseTickFormat; import com.earth2me.essentials.utils.NumberUtil; import com.google.common.collect.Lists; @@ -95,12 +96,12 @@ public class Commandtime extends EssentialsCommand { private void getWorldsTime(final CommandSource sender, final Collection worlds) { if (worlds.size() == 1) { final Iterator iter = worlds.iterator(); - sender.sendMessage(DescParseTickFormat.format(iter.next().getTime())); + sender.sendComponent(AdventureUtil.miniMessage().deserialize(DescParseTickFormat.format(iter.next().getTime()))); return; } for (final World world : worlds) { - sender.sendTl("timeWorldCurrent", world.getName(), DescParseTickFormat.format(world.getTime())); + sender.sendTl("timeWorldCurrent", world.getName(), AdventureUtil.parsed(DescParseTickFormat.format(world.getTime()))); } }