Skip to content

Commit

Permalink
change config setting name
Browse files Browse the repository at this point in the history
  • Loading branch information
triagonal committed Dec 31, 2018
1 parent d1bbeba commit 3d004d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Essentials/src/com/earth2me/essentials/ISettings.java
Expand Up @@ -181,7 +181,7 @@ public interface ISettings extends IConf {

boolean cancelAfkOnInteract();

boolean bypassSleepWhenAfk();
boolean sleepIgnoresAfkPlayers();

boolean isAfkListName();

Expand Down
12 changes: 6 additions & 6 deletions Essentials/src/com/earth2me/essentials/Settings.java
Expand Up @@ -494,7 +494,7 @@ public void reloadConfig() {
cancelAfkOnInteract = _cancelAfkOnInteract();
cancelAfkOnMove = _cancelAfkOnMove();
getFreezeAfkPlayers = _getFreezeAfkPlayers();
bypassSleepWhenAfk = _bypassSleepWhenAfk();
sleepIgnoresAfkPlayers = _sleepIgnoresAfkPlayers();
afkListName = _getAfkListName();
isAfkListName = !afkListName.equalsIgnoreCase("none");
itemSpawnBl = _getItemSpawnBlacklist();
Expand Down Expand Up @@ -871,15 +871,15 @@ private boolean _cancelAfkOnInteract() {
return config.getBoolean("cancel-afk-on-interact", true);
}

private boolean bypassSleepWhenAfk;
private boolean sleepIgnoresAfkPlayers;

@Override
public boolean bypassSleepWhenAfk() {
return bypassSleepWhenAfk;
public boolean sleepIgnoresAfkPlayers() {
return sleepIgnoresAfkPlayers;
}

private boolean _bypassSleepWhenAfk() {
return config.getBoolean("bypass-sleep-when-afk", true);
private boolean _sleepIgnoresAfkPlayers() {
return config.getBoolean("sleep-ignores-afk-players", true);
}

private String afkListName;
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/com/earth2me/essentials/User.java
Expand Up @@ -457,7 +457,7 @@ public void setAfk(final boolean set) {
return;
}

this.getBase().setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") || set && ess.getSettings().bypassSleepWhenAfk());
this.getBase().setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") || set && ess.getSettings().sleepIgnoresAfkPlayers());
if (set && !isAfk()) {
afkPosition = this.getLocation();
this.afkSince = System.currentTimeMillis();
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/config.yml
Expand Up @@ -399,7 +399,7 @@ cancel-afk-on-move: true
# Should AFK players be ignored when other players are trying to sleep?
# When this setting is false, players won't be able to skip the night if some players are AFK.
# Users with the permission node essentials.sleepingignored will always be ignored.
bypass-sleep-when-afk: true
sleep-ignores-afk-players: true

# Set the player's list name when they are AFK. This is none by default which specifies that Essentials
# should not interfere with the AFK player's list name.
Expand Down

0 comments on commit 3d004d2

Please sign in to comment.