New permission: essentials.silentjoin.vanish

The server needs silentjoin to be enabled first.
This commit is contained in:
KHobbits 2014-05-25 19:30:18 +01:00
parent 889dde7549
commit 57bb1ee475
2 changed files with 8 additions and 8 deletions

View file

@ -279,9 +279,12 @@ public class EssentialsPlayerListener implements Listener
user.getBase().setSleepingIgnored(true);
}
if ((ess.getSettings().allowSilentJoinQuit() && user.isAuthorized("essentials.silentjoin")) || message == null)
if ((ess.getSettings().allowSilentJoinQuit() && (user.isAuthorized("essentials.silentjoin") || user.isAuthorized("essentials.silentjoin.vanish"))) || message == null)
{
// Do nothing - silently join
if (user.isAuthorized("essentials.silentjoin.vanish"))
{
user.setVanished(true);
}
}
else if (ess.getSettings().isCustomJoinMessage())
{

View file

@ -94,7 +94,6 @@ public class Settings implements net.ess3.api.ISettings
{
return chatRadius;
}
// #easteregg
private char chatShout = '!';
@ -108,7 +107,6 @@ public class Settings implements net.ess3.api.ISettings
{
return chatShout;
}
// #easteregg
private char chatQuestion = '?';
@ -122,7 +120,6 @@ public class Settings implements net.ess3.api.ISettings
{
return chatQuestion;
}
private boolean teleportSafety;
public boolean _isTeleportSafetyEnabled()
@ -563,7 +560,7 @@ public class Settings implements net.ess3.api.ISettings
economyLog = _isEcoLogEnabled();
economyLogUpdate = _isEcoLogUpdateEnabled();
economyDisabled = _isEcoDisabled();
allowSilentJoin = _isJoinQuitMessagesDisabled();
allowSilentJoin = _allowSilentJoinQuit();
customJoinMessage = _getCustomJoinMessage();
isCustomJoinMessage = !customJoinMessage.equals("none");
customQuitMessage = _getCustomQuitMessage();
@ -1163,9 +1160,9 @@ public class Settings implements net.ess3.api.ISettings
}
private boolean allowSilentJoin;
public boolean _isJoinQuitMessagesDisabled()
public boolean _allowSilentJoinQuit()
{
return config.getBoolean("allow-silent-join-quit");
return config.getBoolean("allow-silent-join-quit", false);
}
@Override