diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index b595d2ff3..d939eca54 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -30,6 +30,8 @@ public interface ISettings extends IConf { int getChatRadius(); + int getNearRadius(); + char getChatShout(); char getChatQuestion(); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index ba3a57281..08a26f549 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -85,6 +85,11 @@ public class Settings implements net.ess3.api.ISettings { return chatRadius; } + @Override + public int getNearRadius() { + return config.getInt("near-radius", 200); + } + // #easteregg private char chatShout = '!'; @@ -258,8 +263,8 @@ public class Settings implements net.ess3.api.ISettings { private Set _getMuteCommands() { Set muteCommands = new HashSet(); - if(config.isList("mute-commands")) { - for(String s : config.getStringList("mute-commands")) { + if (config.isList("mute-commands")) { + for (String s : config.getStringList("mute-commands")) { muteCommands.add(s.toLowerCase(Locale.ENGLISH)); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java index 3c57e45ec..273a59f13 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java @@ -16,7 +16,7 @@ public class Commandnear extends EssentialsCommand { @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - long maxRadius = ess.getSettings().getChatRadius(); + long maxRadius = ess.getSettings().getNearRadius(); if (maxRadius == 0) { maxRadius = 200; diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index af28abc16..025327ecb 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -59,6 +59,11 @@ teleport-invulnerability: 4 # The delay, in seconds, required between /heal or /feed attempts. heal-cooldown: 60 +# Near Radius +# The default radius with /near +# Used to use chat radius but we are going to make it separate. +near-radius: 200 + # What to prevent from /item and /give. # e.g item-spawn-blacklist: 10,11,46 item-spawn-blacklist: