mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 18:11:52 +01:00
New permission: essentials.silentjoin.vanish
The server needs silentjoin to be enabled first.
This commit is contained in:
parent
889dde7549
commit
57bb1ee475
@ -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())
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user