From 7e8114217b9ce99d64831bc8e38794c2f1855079 Mon Sep 17 00:00:00 2001 From: sxphirus Date: Fri, 7 Jan 2022 16:07:31 +0000 Subject: [PATCH] Add format for list entries with /near Will probably need translations --- .../java/com/earth2me/essentials/commands/Commandnear.java | 3 +-- Essentials/src/main/resources/messages.properties | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandnear.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandnear.java index a2ce6c1780f..c829a143b79 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandnear.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandnear.java @@ -3,7 +3,6 @@ import com.earth2me.essentials.CommandSource; import com.earth2me.essentials.User; import com.google.common.collect.Lists; -import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.World; @@ -109,7 +108,7 @@ private String getLocal(final User user, final long radius) { if (nearbyPlayer == null) { continue; } - output.append(nearbyPlayer.getDisplayName()).append(ChatColor.WHITE + "(" + ChatColor.RED).append((long) nearbyPlayer.getLocation().distance(loc)).append("m" + ChatColor.WHITE + ")"); + output.append(tl("nearbyPlayersList", nearbyPlayer.getDisplayName(), (long)nearbyPlayer.getLocation().distance(loc))); } return output.length() > 1 ? output.toString() : tl("none"); diff --git a/Essentials/src/main/resources/messages.properties b/Essentials/src/main/resources/messages.properties index 526dc22db3c..516f78ed02c 100644 --- a/Essentials/src/main/resources/messages.properties +++ b/Essentials/src/main/resources/messages.properties @@ -779,6 +779,7 @@ nearCommandUsage3Description=Lists all players within the default near radius of nearCommandUsage4=/ nearCommandUsage4Description=Lists all players within the given radius of the specified player nearbyPlayers=\u00a76Players nearby\:\u00a7r {0} +nearbyPlayersList={0}\u00a7f(\u00a7c{1}m\u00a7f) negativeBalanceError=\u00a74User is not allowed to have a negative balance. nickChanged=\u00a76Nickname changed. nickCommandDescription=Change your nickname or that of another player.