Skip to content

Commit 7bb12fd

Browse files
authored
Fix incorrect radius check in /me command (#3848)
1 parent 001213e commit 7bb12fd

File tree

1 file changed

+2
-1
lines changed
  • Essentials/src/main/java/com/earth2me/essentials/commands

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ public void run(final Server server, final User user, final String commandLabel,
4040
message = FormatUtil.formatMessage(user, "essentials.chat", message);
4141

4242
user.setDisplayNick();
43-
final int radius = ess.getSettings().getChatRadius();
43+
long radius = ess.getSettings().getChatRadius();
4444
final String toSend = tl("action", user.getDisplayName(), message);
4545
if (radius < 1) {
4646
ess.broadcastMessage(user, toSend);
4747
return;
4848
}
49+
radius *= radius;
4950

5051
final World world = user.getWorld();
5152
final Location loc = user.getLocation();

0 commit comments

Comments
 (0)