mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-30 02:08:24 +00: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
4 changed files with 15 additions and 3 deletions
|
@ -30,6 +30,8 @@ public interface ISettings extends IConf {
|
||||||
|
|
||||||
int getChatRadius();
|
int getChatRadius();
|
||||||
|
|
||||||
|
int getNearRadius();
|
||||||
|
|
||||||
char getChatShout();
|
char getChatShout();
|
||||||
|
|
||||||
char getChatQuestion();
|
char getChatQuestion();
|
||||||
|
|
|
@ -85,6 +85,11 @@ public class Settings implements net.ess3.api.ISettings {
|
||||||
return chatRadius;
|
return chatRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getNearRadius() {
|
||||||
|
return config.getInt("near-radius", 200);
|
||||||
|
}
|
||||||
|
|
||||||
// #easteregg
|
// #easteregg
|
||||||
private char chatShout = '!';
|
private char chatShout = '!';
|
||||||
|
|
||||||
|
@ -258,8 +263,8 @@ public class Settings implements net.ess3.api.ISettings {
|
||||||
|
|
||||||
private Set<String> _getMuteCommands() {
|
private Set<String> _getMuteCommands() {
|
||||||
Set<String> muteCommands = new HashSet<String>();
|
Set<String> muteCommands = new HashSet<String>();
|
||||||
if(config.isList("mute-commands")) {
|
if (config.isList("mute-commands")) {
|
||||||
for(String s : config.getStringList("mute-commands")) {
|
for (String s : config.getStringList("mute-commands")) {
|
||||||
muteCommands.add(s.toLowerCase(Locale.ENGLISH));
|
muteCommands.add(s.toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class Commandnear extends EssentialsCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
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) {
|
if (maxRadius == 0) {
|
||||||
maxRadius = 200;
|
maxRadius = 200;
|
||||||
|
|
|
@ -59,6 +59,11 @@ teleport-invulnerability: 4
|
||||||
# The delay, in seconds, required between /heal or /feed attempts.
|
# The delay, in seconds, required between /heal or /feed attempts.
|
||||||
heal-cooldown: 60
|
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.
|
# What to prevent from /item and /give.
|
||||||
# e.g item-spawn-blacklist: 10,11,46
|
# e.g item-spawn-blacklist: 10,11,46
|
||||||
item-spawn-blacklist:
|
item-spawn-blacklist:
|
||||||
|
|
Loading…
Reference in a new issue