Skip to content

Commit 5c46bea

Browse files
authored
Add translation key for /near entries (#4740)
1 parent a9585bb commit 5c46bea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Essentials/src/main/java/com/earth2me/essentials/commands/Commandnear.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.earth2me.essentials.CommandSource;
44
import com.earth2me.essentials.User;
55
import com.google.common.collect.Lists;
6-
import org.bukkit.ChatColor;
76
import org.bukkit.Location;
87
import org.bukkit.Server;
98
import org.bukkit.World;
@@ -109,7 +108,7 @@ private String getLocal(final User user, final long radius) {
109108
if (nearbyPlayer == null) {
110109
continue;
111110
}
112-
output.append(nearbyPlayer.getDisplayName()).append(ChatColor.WHITE + "(" + ChatColor.RED).append((long) nearbyPlayer.getLocation().distance(loc)).append("m" + ChatColor.WHITE + ")");
111+
output.append(tl("nearbyPlayersList", nearbyPlayer.getDisplayName(), (long)nearbyPlayer.getLocation().distance(loc)));
113112
}
114113

115114
return output.length() > 1 ? output.toString() : tl("none");

Essentials/src/main/resources/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ nearCommandUsage3Description=Lists all players within the default near radius of
779779
nearCommandUsage4=/<command> <player> <radius>
780780
nearCommandUsage4Description=Lists all players within the given radius of the specified player
781781
nearbyPlayers=\u00a76Players nearby\:\u00a7r {0}
782+
nearbyPlayersList={0}\u00a7f(\u00a7c{1}m\u00a7f)
782783
negativeBalanceError=\u00a74User is not allowed to have a negative balance.
783784
nickChanged=\u00a76Nickname changed.
784785
nickCommandDescription=Change your nickname or that of another player.

0 commit comments

Comments
 (0)