Fix incorrect radius check in /me command (#3848)

This commit is contained in:
triagonal 2020-12-21 15:08:11 +11:00 committed by GitHub
parent 001213ee2c
commit 7bb12fd33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -40,12 +40,13 @@ public class Commandme extends EssentialsCommand {
message = FormatUtil.formatMessage(user, "essentials.chat", message);
user.setDisplayNick();
final int radius = ess.getSettings().getChatRadius();
long radius = ess.getSettings().getChatRadius();
final String toSend = tl("action", user.getDisplayName(), message);
if (radius < 1) {
ess.broadcastMessage(user, toSend);
return;
}
radius *= radius;
final World world = user.getWorld();
final Location loc = user.getLocation();