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); 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()) else if (ess.getSettings().isCustomJoinMessage())
{ {

View file

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