mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
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:
parent
d6eb846488
commit
179dbe19fd
@ -30,6 +30,8 @@ public interface ISettings extends IConf {
|
||||
|
||||
int getChatRadius();
|
||||
|
||||
int getNearRadius();
|
||||
|
||||
char getChatShout();
|
||||
|
||||
char getChatQuestion();
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user