mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
- New Permission Node: townychat.spam.bypass
- Defaults to ops.
- Bypasses spam check.
This commit is contained in:
1 parent
78c7bd146b
commit
0a92c5ac1c
3 files changed
+8
-1
No files matched your search
@@ -277,3 +277,6 @@ v0.63:
|
|||||||
- setting spam_time: '0.5' in your general channel will make the global channel behave as normal.
|
- setting spam_time: '0.5' in your general channel will make the global channel behave as normal.
|
||||||
- default channels.yml has spam_time: '0.5' set for general, town, nation and alliance channels; remaining channels have no spam_time set.
|
- default channels.yml has spam_time: '0.5' set for general, town, nation and alliance channels; remaining channels have no spam_time set.
|
||||||
- in your chatconfig.yml you can remove the "spam_time: '0.5'" line before or after updating.
|
- in your chatconfig.yml you can remove the "spam_time: '0.5'" line before or after updating.
|
||||||
|
- New Permission Node: townychat.spam.bypass
|
||||||
|
- Defaults to ops.
|
||||||
|
- Bypasses spam check.
|
||||||
@@ -54,3 +54,6 @@ permissions:
|
|||||||
townychat.chat.format.reset:
|
townychat.chat.format.reset:
|
||||||
description: Allows the use of &r to reset chat formatting.
|
description: Allows the use of &r to reset chat formatting.
|
||||||
default: true
|
default: true
|
||||||
|
townychat.spam.bypass:
|
||||||
|
description: Keeps a player from getting stopped by spam checks.
|
||||||
|
default: op
|
||||||
@@ -254,7 +254,8 @@ public abstract class Channel {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isSpam(Player player) {
|
public boolean isSpam(Player player) {
|
||||||
|
if (!player.hasPermission("townychat.spam.bypass"))
|
||||||
|
return false;
|
||||||
long timeNow = System.currentTimeMillis();
|
long timeNow = System.currentTimeMillis();
|
||||||
long spam = timeNow;
|
long spam = timeNow;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user