Skip to content

Commit

Permalink
feat(ignore-command): add permission named "clab.ignore-bypass", to b…
Browse files Browse the repository at this point in the history
…ypass the ignore event being capable to send message to any player
  • Loading branch information
BryanGmG committed Jun 9, 2023
1 parent 3c11c2f commit bd6f1dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ With the plugin you can:

## Permissions:

| Permission | Description |
|-------------|---------------------------------------------|
| clab.tags | To use the MiniMessage tags in chat format. |
| clab.reload | To reload the plugin. |
| Permission | Description |
|-------------|------------------------------------------------|
| clab.tags | To use the MiniMessage tags in chat format. |
| clab.reload | To reload the plugin. |
| clab.ignore-bypass | To bypass the ignore event. |


## To do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void messageCommand(@Sender Player sender, Player target,
Placeholder.unparsed("target", target.getName()),
Placeholder.unparsed("message", senderMessage));

if (!messageAuthorizer.isAuthorized(sender.getUniqueId().toString(), target.getUniqueId().toString())) {
if (!messageAuthorizer.isAuthorized(sender.getUniqueId().toString(), target.getUniqueId().toString()) && !target.hasPermission("clab.ignore-bypass")) {
return;
}

Expand Down

0 comments on commit bd6f1dc

Please sign in to comment.