Use separate config option for near radius.

We were using chat radius, which upset me when I wanted to change it but didn't want to start using local chat.
This commit is contained in:
drtshock 2015-05-16 19:36:57 -05:00
parent d6eb846488
commit 179dbe19fd
4 changed files with 15 additions and 3 deletions

View file

@ -30,6 +30,8 @@ public interface ISettings extends IConf {
int getChatRadius();
int getNearRadius();
char getChatShout();
char getChatQuestion();

View file

@ -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<String> _getMuteCommands() {
Set<String> muteCommands = new HashSet<String>();
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));
}
}

View file

@ -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;

View file

@ -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: