mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-11 02:47:52 +01:00
Add permission to bypass other's msgtoggle (#1955) @Xeyame
* Add permission to bypass other's msgtoggle Also thanks to MD for helping me with the code :) * Correct comment * Remove checking for console in favour of the already existing IUser check * Fix comments, again * Re add isIgnoreMsg() check Accidently removed it, sorry * Combine 2 checks
This commit is contained in:
parent
817caf299f
commit
7298393ec9
@ -121,8 +121,7 @@ public class SimpleMessageRecipient implements IMessageRecipient {
|
||||
User user = getUser(this);
|
||||
boolean afk = false;
|
||||
if (user != null) {
|
||||
if (user.isIgnoreMsg()
|
||||
&& !(sender instanceof Console)) { // Console must never be ignored.
|
||||
if (user.isIgnoreMsg() && sender instanceof IUser && !((IUser) sender).isAuthorized("essentials.msgtoggle.bypass")) { // Don't ignore console and senders with permission
|
||||
return MessageResponse.MESSAGES_IGNORED;
|
||||
}
|
||||
afk = user.isAfk();
|
||||
|
Loading…
Reference in New Issue
Block a user