kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
49 stars 23 forks source link

1.16.5: ClassCastException on player join #686

Closed LogGits closed 3 years ago

LogGits commented 3 years ago

Error #632 but different line (I was told to make a seperate issue hence this) (happens on playerjoin):

ERROR 20:02:42
Could not pass event AsyncPlayerPreLoginEvent to ChatControlRed v10.2.3
Console 20:02:42
java.lang.ClassCastException: class java.lang.String cannot be cast to class org.mineacademy.chatcontrol.lib.model.SimpleTime (java.lang.String is in module java.base of loader 'bootstrap'; org.mineacademy.chatcontrol.lib.model.SimpleTime is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @385f7d88)
at org.mineacademy.chatcontrol.listener.PlayerListener.onPreLogin(PlayerListener.java:102) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1105.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-457]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.16.5.jar:git-Paper-457]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-457]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-457]
at net.minecraft.server.v1_16_R3.LoginListener$LoginHandler.fireEvents(LoginListener.java:314) ~[patched_1.16.5.jar:git-Paper-457]
at net.minecraft.server.v1_16_R3.LoginListener$1.run(LoginListener.java:206) ~[patched_1.16.5.jar:git-Paper-457]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

Settings.yml as requested:

# !-----------------------------------------------------------------------------------------------!
#                       Welcome to the main configuration of ChatControl
# !-----------------------------------------------------------------------------------------------!
#
#    For support and documentation, please visit:
#    - https://github.com/kangarko/ChatControl-Pro/wiki
#
# !-----------------------------------------------------------------------------------------------!
#
#    1) COLOR CODES are supported with the '&' character.
#       - For usage, see http://minecraftwiki.net/wiki/Formatting_codes
#       - When you use them, place quotes around the message like this: "Hello &cworld."
#       - To use HEX colors, use #123456 syntax: "Hello #123456world."
#
#    2) TO HIDE any message, set it to 'none'.
#
#    3) For UNICODE CHARACTERS (smileys, symbols, ..), save the file in UTF-8 encoding. See
#       - https://github.com/kangarko/ChatControl-Pro/wiki/Use-Right-Encoding
#
#    4) JSON is supported.
#       - For usage, see https://github.com/kangarko/ChatControl-Pro/wiki/JSON
#
#    5) WHITELISTS can be turned into blacklists, by putting "@blacklist" on the first line.
#       - Doing such, filters will only apply for messages in those lists.
#
#    PS: Everything above applies for all files in ChatControl/ folder.
#
# !-----------------------------------------------------------------------------------------------!
#
# -------------------------------------------------------------------------------------------------
# Settings controlling the main chat formatting.
#
# **IMPORTANT** You can force players to automatically join into channels on join using 
# permissions, see https://github.com/kangarko/ChatControl-Red/wiki/Channels#auto-join
# -------------------------------------------------------------------------------------------------
Channels:

  # Should we format the chat and apply channels?
  Enabled: true

  # What commands should trigger our main channel command?
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'channel'
  - 'ch'

  # How many channels a player can read at once maximum? 
  # You can override this in "Groups" section below.
  Max_Read_Channels: 3

  # true = When you join a new channel for writing, we make you read your old channel.
  # false = When you join, we leave you from your old writing channel.
  Join_Read_Old: false

  # If you gave player permissions to automatically join a channel on join, and he decided to
  # leave it, should we remember his option and not join him to channel next time he logs in?
  Ignore_Autojoin_If_Left: true

  # Save yourself from accidentally revealing you are online by disabling your ability to send
  # direct chat messages. You will need to use "/channel send" instead.
  Prevent_Vanish_Chat: true

  # The default console format unless overriden below. Does not support formats.
  # Set this to "default" in your channel settings to use the channel's format instead.
  Format_Console: '[{channel}] {player}: {message}'

  # The default Discord format unless overriden below. Does not support formats.
  # We automatically send messages to Discord channels that you have linked in the "Integration"
  # section below. To disable this per-channel, set Format_Discord to "none" for that channel.
  Format_Discord: '&8[&3Discord&8] &7{player}: &f{message}'

  # A list of worlds where we will not format chat. Rules, antispam and filters will still be
  # appled and you can disable them by giving "chatcontrol.bypass.*" permission in that world.
  Ignore_Worlds: []

  # Channels are preconfigured public chat rooms where players can message each other.
  # You can add various keys and remove those you don't use, see this tutorial:
  # https://github.com/kangarko/chatcontrol-pro/wiki/Channels
  #
  # Channel options:
  #
  # - Format: The only mandatory option. Represents the style of the message 
  #           when sent into the channel. Either type the format directly such as 
  #           "{player}: {message}" there, or type the name of a Format from your formats/ folder,
  #           such as "chat" if your format file is called chat.yml. Formats can have fancy
  #           hoverable and clickable parts.
  #
  # - Format_Console: Overrides the console format from above. Set to "none" to hide or "default"
  #                   to use channel's formatting.
  #                   Warning: The only way to hide console log is to cancel the event, which may
  #                   conflict with DynMap or other plugins. Be careful hiding this!
  #
  # - Format_Discord: Overrides the discord format from above. To disable, do NOT use the Discord
  #                   option and we simply won't send messages to Discord.
  #
  # - Format_Spy: Overrides the spy format from the "Spy" section below. Set to "none" to hide.
  #
  # - Range: How far in blocks around player should others see the message?
  #          To make the range per-world, set it to "*", otherwise set it to a number
  #          such as "50" that would be 50 blocks around the sender.
  #          Staff with chatcontrol.bypass.range permission will reach everyone on all worlds.
  #          Players with chatcontrol.bypass.range.world will reach everyone on the same world
  #          and linked worlds.
  #
  # - Range_Worlds: If "Range" is set to "*", which means everyone on world sees the message,
  #                 this is a list of worlds that are connected where players chat together.
  # 
  # - Party: Makes the channel players only reach other players in the same party. This can work
  #          together with Range, but does not require that option. 
  #          Available values: factions-faction, plotsquared-plot, towny-town, towny-nation,
  #          mcmmo-party and lands-land
  #          Warning: The Party option does not work over BungeeCord!
  #
  # - Message_Delay: This overrides Anti_Spam.Chat.Delay so you can chat chat delay per channel.
  #                  Put string values there like "5 seconds" or "1 minute" etc.
  #
  # - Bungee: true/false option. This overrides Integration.BungeeCord from below, so you can
  #           disable BungeeCord message synchronization for some channels.
  #
  # - Discord: true/false option. Ensure you have your Discord channel linked in Integration below,
  #            and then set this on "true" to connect your channel with Discord. See this link:
  #            https://github.com/kangarko/ChatControl-Red/wiki/Discord for a quick tutorial.
  #
  # - Cancel_Event: true/false option. Set to true if you want this channel to be hidden from DynMap
  #                 or other plugins. You may need adjusting this: 
  #                 https://github.com/kangarko/ChatControl-Red/wiki/Listener-Priorities
  #
  List:
    standard:
      Format: Chat

# -------------------------------------------------------------------------------------------------
# Prevent flooding the chat with junk / repetitive messages.
# -------------------------------------------------------------------------------------------------
Anti_Spam:

  # Settings applied to chat:
  Chat:

    # How many seconds must the player wait between each message? Set to 0 to disable.
    Delay: 7 seconds

    # Block repetitive messages if they are similar to the previous one, in percent.
    # Set to 0% to disable.
    Similarity: 70%

    # The amount of previous messages to check. Prevents spam like this:
    # <player> t
    # <player> lol
    # <player> t
    # <player> lol
    # Since this uses the Similarity key above it only works if Similarity is not disabled.
    Similarity_Past_Messages: 2

    # The threshold after which we will forgive the player for writing the same message.
    Similarity_Time: 10 seconds

    # Regular expressions that, if match the message, will prevent delay check from applying.
    Whitelist_Delay:
    - 'hello'
    - 'hey'
    # Regular expressions that, if match the message, will prevent similarity check from applying.
    Whitelist_Similarity:
    - 'hello'
    - 'hey'

    # Limit how many messages the player can send in the given period,
    # for example you can restrict sending maximum 5 messages in the last 10 seconds.
    # This works differently then the delay check above because players
    # can type their messages rapidly after each other as long as the total number
    # of messages within the period is lower than the limit.
    Limit:

      # The period to check. Set to 0 to disable.
      Period: 10 seconds

      # How many messages can players send maximum in the period above?
      Max_Messages: 5

  # Settings applied to commands:
  Commands:

    # How many seconds must the player wait between each command? Set to 0 to disable.
    Delay: 0 seconds

    # Block repetitive commands if they are similar to the previous one, in percent.
    # Set to 0% to disable.
    Similarity: 0%

    # Amount of previous commands to check. Example: Setting this to 2 prevents spam like this:
    # /tell Notch lol
    # /tell Notch t
    # /tell Notch lol
    # /tell Notch t
    # Since this uses the Similarity key above it only works if Similarity is not disabled.
    Similarity_Past_Commands: 1

    # The threshold after which we will forgive the player for running the same command.
    Similarity_Time: 10 seconds

    # Commands the player can type bypassing the Delay above. We check the command label
    # so if you put "/tell" there, "/tell ANYTHING" will be matched.
    #
    # Whitelist_Delay:
    #   - /spawn
    #   - /hello
    Whitelist_Delay:
    - '/spawn'
    - '/warp'
    - '/home'

    # Commands the player can type bypassing the Similarity above. We check the command label
    # so if you put "/tell" there, "/tell ANYTHING" will be matched.
    #
    # Whitelist_Similarity:
    #   - /tell
    #   - /pm
    #   - /t
    #   - /w
    #   - /r
    Whitelist_Similarity:
    - '/tag'
    - '/nick'
    - '/tell'
    - '/pm'
    - '/t'
    - '/w'
    - '/r'
    - '/togglepm'
    - '/togglebroadcast'

    # Limit how many commands the player can send in the given period,
    # for example you can restrict sending maximum 5 commands in the last 10 seconds.
    # This works differently then the delay check above because players
    # can type their commands rapidly after each other as long as the total number
    # of commands within the period is lower than the limit.
    Limit:

      # The period to check. Set to "0 seconds" to disable.
      Period: 10 seconds

      # How many messages can players send maximum in the period above?
      Max_Commands: 6

# -------------------------------------------------------------------------------------------------
# Prevent messages written in BIG LETTERS.
# -------------------------------------------------------------------------------------------------
Anti_Caps:

  # Should we enable this feature?
  Enabled: false

  # List of commands checked for capitalization.
  # [TIP] To enable anti-caps everywhere, set the list to ["*"]
  Enabled_In_Commands:
  - '/msg'
  - '/tell'

  # How many letters must the message contain to trigger this check?
  Min_Message_Length: 5

  # How much percent of the message must be CAPITALIZED to trigger this check?
  Min_Caps_Percentage: 50

  # How many capitalized letters must appear after each other to trigger this check?
  # This is IRRESPECTIVE of the caps percentage setting above. Those two settings are
  # evaluated "this, or that" so if one of the two conditions are true, the anti-caps fires.
  Min_Caps_In_A_Row: 5

  # Allow the following words to be capitalized.
  Whitelist:
  - 'OMG'
  - 'LOL'
  - 'WTF'
  - 'WOW'
  - 'ROFL'

# -------------------------------------------------------------------------------------------------
# Reduce impact of spamming bots.
# -------------------------------------------------------------------------------------------------
Anti_Bot:

  # Block chatting until the player has moved?
  Block_Chat_Until_Moved: true

  # A list of commands to block until the player has moved.
  #
  # There are three ways of configuring this.
  #
  # 1) Set this to ["*"] to block all commands (don't do this if you have a login plugin)
  #
  # 2) Set this to a list of commands to block, others will be allowed:
  # Block_Commands_Until_Moved:
  #   - /afk
  #   - /me
  #
  # 3) Put @blacklist on the first line then commands. Only these commands will be allowed#
  #    and we block all other commands until player has moved.
  # Block_Commands_Until_Moved:
  # - "@blacklist"
  # - /login
  # - /register
  # - /reg
  # - /l
  Block_Commands_Until_Moved:
  - '/afk'
  - '/me'

  # Prevent placing two signs with the same text. Blocks "AutoSign" hack where the hack client
  # automatically places a sign with the same text just by right clicking with it.
  Block_Same_Text_Signs: false

  # Filter bad player names from entering your server. Supports regular expressions. Example:
  # Disallowed_Usernames:
  #   - '(f+(\W|\d|_)*u+(\W|\d|_)*c+(\W|\d|_)*k+(\W|\d|_)*)'
  #   - bitch
  #   - asshole
  Disallowed_Usernames:
  - '(f+(\W|\d|_)*u+(\W|\d|_)*c+(\W|\d|_)*k+(\W|\d|_)*)'
  - 'bitch'
  - 'asshole'

  # Control how fast the player can do certain actions.
  Cooldown:

    # How many seconds the player needs to wait before logging in again? Example: 4 seconds
    Rejoin: 5 seconds

    # How many seconds must the player wait after login to chat?
    Chat_After_Login: 1 seconds

    # How many seconds must the player wait after login to run commands?
    Command_After_Login: 1 seconds

# -------------------------------------------------------------------------------------------------
# Limit what commands players can auto-complete using TAB
# -------------------------------------------------------------------------------------------------
Tab_Complete:

  # Enable this feature?
  Enabled: false

  # Prevent completions for words shorter that the given amount of letters.
  # **On Minecraft older than 1.13 this only works properly on the first command argument.**
  Prevent_If_Below_Length: 0

  # What commands should we prevent from being tab-completed? Uses regular expressions.
  # [TIP] This is turned into blacklist by default, see header of this configuration.
  Whitelist:
  - '@blacklist'
  - '(/ver|/version)\b'
  - '(/pl|/plugins)\b'
  - '/hiddenCommand'

# -------------------------------------------------------------------------------------------------
# Correct player's grammar.
# -------------------------------------------------------------------------------------------------
Grammar:

  # Punctualize every sentence (insert a dot at the end) longer than the given letters.
  # Set to 0 to disable. We recommend setting this to 5.
  Insert_Dot_Message_Length: 0

  # Capitalize sentences (make the first letter uppercased) longer than the given letters.
  # Set to 0 to disable. We recommend setting this to 5.
  Capitalize_Message_Length: 0

# -------------------------------------------------------------------------------------------------
# Rules are user-defined filters that catch messages based on regular expressions.
# See "rules/" folder for configuration and examples.
# -------------------------------------------------------------------------------------------------
Rules:

  # Where should the rules be applied to?
  # [TIP] You can import rules from other files by writing @import <rule type> in your .rs files.
  # Options: chat, command, packet, sign, book, anvil, tag
  Apply_On:
  - 'chat'
  - 'command'
  - 'packet'
  - 'sign'
  - 'book'
  - 'anvil'
  - 'tag'

  # Print the '*--------- Rule match (X) for Y ---------' messages into the console?
  # [TIP] You can hide this per-rule using the "dont verbose" operator.
  Verbose: false

  # Remove colors from checked messages? Prevents bypasing filters by using colors: fu&cck.
  # [WARNING] This will remove all custom colors in the message in case it is filtered!
  # TURNING THIS OFF can break packet rules and make players able to bypass rules by using colors.
  Strip_Colors: true

  # Replace accents before matching? Such as "dáma" to "dama" or "gjøre" to "gjore" etc.
  # This is applied against the "match" operator.
  #
  # [IMPORTANT] If this is enabled, DO NOT USE accents in your rules because using them will break
  # the rule. Only put "match dama" or "match gjore" and all dama, dáma and gjøre and gjore will
  # automatically be matched for you.
  Strip_Accents: true

  # Evaluate the "match" operator in rules/ case insensitively? Poses slight performance penalty.
  # NB: When testing on regex101.com make sure you toggle "insensitive" and "unicode" flags
  # when testing expressions to get accurate results: https://i.imgur.com/QEDZx5N.png
  Case_Insensitive: true

  # Prevent regular expressions from rules and messages freezing the server if they take 
  # more time than the amount specified below, in milliseconds.
  # IF THE FIRST MESSAGE AFTER PLUGIN'S RELOAD TRIGGERS A RULE THIS MAY HAPPEN, IT'S NORMAL
  Regex_Timeout_Ms: 50

# -------------------------------------------------------------------------------------------------
# Private messages allow players to privately message one another.
# -------------------------------------------------------------------------------------------------
Private_Messages:

  # Should we enable this feature?
  Enabled: true

  # Send message as an advancement (requires Minecraft 1.12+)?
  # [IMPORTANT] This causes a performance penaulty visible in timings because Toasts must be
  # sent on the main server thread (otherwise your data in world/ folder(s) may be get corrupted)
  Toasts: false

  # Format: sound_name, volume (float, from 0.0F to 1.0F), pitch (float, from 0.0F to 1.0F)
  # For all available sounds, see https://mineacademy.org/sounds
  # Set to "none" to disable
  Sound: ENTITY_CHICKEN_EGG 1F 1.5F

  # The tell command aliases.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Tell_Aliases:
  - 'tell'
  - 'msg'
  - 't'
  - 'whisper'

  # The reply command aliases.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Reply_Aliases:
  - 'reply'
  - 'r'

  # Format used in private messages for sender.
  Format_Sender: Private_Message_Sender

  # Format used in private messages for recipient.
  Format_Receiver: Private_Message_Receiver

  # Format for Toasts. Maximum 2 lines and each line is trimmed to 21 letter width automatically.
  # Use | instead of \n as line separator.
  Format_Toast: '&7PM from &6{sender}:|&f{message}'

  # Format for message which will be sent to console. Leave empty to disable.
  Format_Console: '[pm] {sender} -> {receiver}: {message}'

# -------------------------------------------------------------------------------------------------
# Represents settings for player messages such as join, quit, death and timed messages
# -------------------------------------------------------------------------------------------------
Messages:

  # What aspects of messages should be enabled?
  # Options: join, quit, kick, death, timed
  #
  # If you have another plugin handling join/quit etc. messages, remove them from list below.
  # If you want to hide those messages, leave them in Apply_On and empty your messages/ .rs files.
  Apply_On:
  - 'join'
  - 'quit'
  - 'death'
  - 'timed'

  # Files in messages/ folder are read from top to bottom. A true value means that if you have
  # multiple messages there, we only send the first eligible message to the player (we evaluate
  # this for each player separatedly). A false value means players will see all messages
  # that are eligible for them. 
  Stop_On_First_Match: true

  # Automatically append prefix to messages of the given type. Edit/remove/add sections below
  # from Apply_On key above to the left, and prefix to the right.
  # The message types that you do not specify below, will have no prefix unless specified
  # individually. You can also disable prefix for some messages by writing "prefix none" there.
  #
  # Example:
  # Prefix:
  #   join: "&8[&2+&8] &7"
  #   quit: "&8[&4-&8] &7"
  #   kick: "&8[&4-&8] &7"
  #   death: "&8[&4x&8] &7"
  #   timed: "{announce_prefix}"
  Prefix:

  # Broadcast messages automatically to your Discord.
  # Put the types from Apply_On above to the left, and the Discord channel to the right. Your
  # Discord channel must first be connected in the Integration section below!
  #
  # Example:
  # Discord:
  #   join: standard
  Discord:

  # If you want to display join message after other plugins, you can send it
  # a bit later such as 1 tick later than the other messages. 
  # **YOU CANNOT OVERRIDE THIS WITH THE "DELAY" OPERATOR**
  Defer_Join_Message_By: 1 tick

  # The default broadcast delay. You can override this for each broadcast with the "delay" operator
  # as long as it is above this limit.
  Timed_Delay: 1200 seconds

# -------------------------------------------------------------------------------------------------
# Represents settings for letting players use colors in their chat or select a custom color.
#
# You must give players the following permissions for them to be able to use colors:
# - chatcontrol.color.{color} (replace color with color name such as "red)
# - chatcontrol.hexcolor.{color} (replace color with the hex code such as "ccdd44")
# - chatcontrol.guicolor.{color} (replace color with color names, used in /chc color menu)
# - chatcontrol.use.color.{apply_on} (replace apply_on with options below) - Let players write &
#                                  colors and hexcodes to places in Apply_On below. true by default
# -------------------------------------------------------------------------------------------------
Colors:

  # Where should we let players to use & or RGB color codes?
  # Options: chat, me, prefix, nick, suffix, private_message
  Apply_On:
  - 'chat'
  - 'me'
  - 'prefix'
  - 'nick'
  - 'suffix'
  - 'private_message'

# -------------------------------------------------------------------------------------------------
# Allow players to mention others in the chat: Hello @kangarko!
# and play a sound to the player who is mentioned.
# -------------------------------------------------------------------------------------------------
Sound_Notify:

  # Should we enable this feature? Requires channels.
  Enabled: true

  # The time before they player can use this feature again?
  Cooldown: 2 seconds

  # Only allow mentioning afk players? Uses Essentials.
  Require_Afk: false

  # Only mention when the player's name starts with the specific character.
  # Example: 'Hello @kangarko, are you there?' Set to '' to always allow.
  Require_Prefix: ''

  # Format: sound_name, volume (float, from 0.0F to 1.0F), pitch (float, from 0.0F to 1.0F)
  # For all available sounds, see https://mineacademy.org/sounds
  # Set to "none" to disable
  Sound: ENTITY_EXPERIENCE_ORB_PICKUP, 100F, 1F

  # Highlight the name of the notified player. Set to "" to disable.
  # You can create individual colors by using Sound_Notify_Color key in the "Groups" section.
  Color: '&e&o'

# -------------------------------------------------------------------------------------------------
# A /me is a command allowing you to broadcast your message in a different way then chat.
# -------------------------------------------------------------------------------------------------
Me:

  # Should we enable this feature?
  Enabled: true

  # What commands will invoke the me feature?
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'me'
  - 'shout'
  - 'status'

  # The format used in the command. You can type the format here or reference to one in formats/.
  Format: Me

# -------------------------------------------------------------------------------------------------
# A /list is a command to list players on this server and across your BungeeCord network.
# -------------------------------------------------------------------------------------------------
List:

  # Should we enable this feature?
  Enabled: false

  # What commands will invoke the list feature?
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'list'
  - 'ls'
  - 'l'

  # The outlook of each line of the list command. 
  Format_Line: list

  # The key by which players are sorted. You can use any variable(s), even from PlaceholderAPI. 
  Sort_Prefix: '{player_group}'

# -------------------------------------------------------------------------------------------------
# Ability to ignore chat and private messages from certain players.
# -------------------------------------------------------------------------------------------------
Ignore:

  # Should we enable this feature
  Enabled: true

  # The commands that invoke the ignore feature.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'ignore'
  - 'ign'

  # Hide chat messages from ignored players?
  Hide_Chat: true

  # Prevent players you ignore from private messaging you?
  Stop_Private_Messages: true

# -------------------------------------------------------------------------------------------------
# Stop people from writing to the chat with the "/mute" command.
# -------------------------------------------------------------------------------------------------
Mute:

  # Should we enable this feature?
  Enabled: false

  # The commands that invoke the mute feature.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'mute'

  # If the server is muted, which commands should we disable?
  Prevent_Commands:
  - '/me'
  - '/tell'
  - '/msg'
  - '/reply'
  - '/r'
  - '/w'

  # Should we deny writing to the books?
  Prevent_Writing_Books: false

  # Should we deny placing signs?
  Prevent_Placing_Signs: false

  # Should we hide join messages?
  Hide_Join_Messages: true

  # Should we hide quit messages?
  Hide_Quit_Messages: true

  # Should we hide death messages?
  Hide_Death_Messages: true

# -------------------------------------------------------------------------------------------------
# Welcome players to the server with a custom message when they join.
# -------------------------------------------------------------------------------------------------
Motd:

  # Should we enable this feature?
  Enabled: true

  # How long to wait to show motd on join?
  Delay: 3 ticks

  # The commands that manually show the motd to the player.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'motd'

  # What message is sent to the player on login? This is fetched from formats/.
  Format_Motd: Motd

  # What message is sent when the player joins for the first time.
  Format_Motd_First_Time: Motd

  # What message is sent when the player is a newcomer? See the "Newcomer" section for settings.
  Format_Motd_Newcomer: Motd

  # Format: sound_name, volume (float, from 0.0F to 1.0F), pitch (float, from 0.0F to 1.0F)
  # For all available sounds, see https://mineacademy.org/sounds
  # Set to "none" to disable
  Sound: ENTITY_FIREWORK_LAUNCH, 1F, 1F

# -------------------------------------------------------------------------------------------------
# Announce important messages with the "/chc announce" command.
# You can customize the format in localization.
#
# TIP: Use {receiver} variable in the message to replace it to each player's name!
# -------------------------------------------------------------------------------------------------
Announcer:

  # Sound played when sending chat message announcements.
  # Format: sound_name, volume (float, from 0.0F to 1.0F), pitch (float, from 0.0F to 1.0F)
  # For all available sounds, see https://mineacademy.org/sounds. Set to "none" to disable
  # Set to "none" to disable
  Chat_Sound: ENTITY_ARROW_HIT_PLAYER 1.0F 0.1F

# -------------------------------------------------------------------------------------------------
# Send players post even when they are offline.
# -------------------------------------------------------------------------------------------------
Mail:

  # Should we enable this feature?
  Enabled: false

  # The commands that invoke the mail command.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'mail'
  - 'email'
  - 'post'
  - 'gmail'

# -------------------------------------------------------------------------------------------------
# Set yourself a nick, a prefix or a suffix.
# [TIP] Admins can use the /chc tag commands to list all nicks or manage other players.
# -------------------------------------------------------------------------------------------------
Tag:

  # Where should we enable this feature?
  # Available options: prefix, nick, suffix
  # Leave empty to completely disable custom prefixes, nicks and suffixesa.
  #
  # **IMPORTANT** Remove "nick" there if you use another nicks plugin such as Nicky or CMI.
  # However, we only offer limited support for these plugins now using the {nick} variable.
  Apply_On:
  - 'prefix'
  - 'nick'
  - 'suffix'

  # The commands that invoke the tag command.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'tag'

  # The max allowed length for a nick? (Colors are not counted)
  Max_Nick_Length: 10

  # Optional prefix to be forced before a player's nick like "~".
  Nick_Prefix: ''

  # Prevent players from setting nicknames that equal to a real player username?
  Nick_Disable_Impersonation: true

  # true = alter player's displayname (not used by us but other plugins can see this) and custom name
  # false = only changes player's tab list name if enabled in Tab_List
  Change_Displayname: true

  # true = alter player's custom name (may show above him) if he sets a nick
  # false = feature disabled
  Change_Customname: false

# -------------------------------------------------------------------------------------------------
# Allow players to look up the nick/real name of other players by their name/nick.
# Requires Tag.Apply_On having "nick" inside. 
# -------------------------------------------------------------------------------------------------
Real_Name:

  # The commands that invoke the tag command.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'realname'
  - 'realn'
  - 'rn'

# -------------------------------------------------------------------------------------------------
# Customize your tab list
# -------------------------------------------------------------------------------------------------
Tab_List:

  # Change the tablist for players?
  Enabled: false

  # The format of the tab list
  Format: '{player_prefix+}{player_nick}'

# -------------------------------------------------------------------------------------------------
# Toggle seeing parts of the plugin - disable private messages, timed broadcasts, join messages etc
# -------------------------------------------------------------------------------------------------
Toggle:

  # Where should we enable this feature?
  # Available: chat, mail, announcement, me, pm
  #
  # Leave empty to completely prevent players from disabling all of these features.
  Apply_On:
  - 'chat'
  - 'mail'
  - 'announcement'
  - 'me'
  - 'pm'

  # The commands that invoke the toggle command.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'toggle'
  - 'tg'

# -------------------------------------------------------------------------------------------------
# Spying allows to see messages, commands, private messages, books, renamed items and more
# from other players. Talking about privacy rights!
#
# [TIP] Give staff chatcontrol.spy.autoenable permission to auto enable spy on join.
# -------------------------------------------------------------------------------------------------
Spy:

  # Where should we enable this feature?
  # Options: chat, command, private_message, mail, sign, book, anvil
  Apply_On:
  - 'chat'
  - 'command'
  - 'private_message'
  - 'mail'
  - 'sign'
  - 'book'
  - 'anvil'

  # What prefix should we display before all formats below?
  # You can disable this per-format by prepending it with "@noprefix"
  Prefix: '&8[&5Spy&8] '

  # The commands that invoke the spy command.
  # EDIT AS YOU WISH BUT DO NOT REMOVE THE FIRST ALIAS
  Command_Aliases:
  - 'spy'
  - 'socialspy'

  # Format used to spy chat messages. By default, we use the "spy.yml" format from formats/ folder.
  # Exclude prefix from above since we already have a custom one in the "spy" format that we use.
  # You can override this per-channel by writing "Format_Spy" key to your channel keys above.
  Format_Chat: '@noprefix spy'

  # Format used to spy party chat messages (from plugins such as mcMMO or TownyChat).
  # See Format_Chat above for more help. You cannot however, use the Format_Spy option since
  # this channel does not exists in ChatControl.
  Format_Party_Chat: '@noprefix spy-party'

  # Format used to spy commands.
  Format_Command: '&7{player}: &f{message}'

  # Format used to spy private messages.
  Format_Private_Message: '&7{sender} &8-> &7{receiver}: &f{message}'

  # Format used to spy mails.
  Format_Mail: spy-mail

  # Format used to spy signs.
  Format_Sign: spy-sign

  # Format used to spy books.
  Format_Book: spy-book

  # Format used to spy renamed items.
  Format_Anvil: spy-anvil

  # List of commands we should spy. Mail and PMs are spied using their own method. You can use
  # the @blacklist feature as described in the header of this file.
  #
  # We only evaluate the list against the command label such as "/tell", meaning anything later
  # in the command does not matter! "/tell kangarko ahoj" -> only "/tell" will be matched
  # TO DISABLE SPYING ON COMMANDS, SET THIS TO [] OR REMOVE "command" FROM Apply_On SETTING ABOVE
  Commands:
  - '/tell'
  - '/msg'
  - '/t'
  - '/whisper'
  - '/r'
  - '/reply'

# -------------------------------------------------------------------------------------------------
# Apply different the settings from this file for people with certain permissions.
# See https://github.com/kangarko/ChatControl-Pro/wiki/Groups for a quick tutorial.
#
# You can create and remove sections below as you wish. Then give chatcontrol.group.<section>
# permissions and the options for that sections will apply for people with that permission.
# Example: people with chatcontrol.group.admin permission will have no chat message delay.
#
# Available options with their example values:
#   Max_Read_Channels: 1
#   Message_Delay: 2 seconds
#   Message_Similarity: 50%
#   Command_Delay: 3 seconds
#   Command_Similarity: 50%
#   Rejoin_Cooldown: 4 seconds
#   Sound_Notify_Color: "&6"
# -------------------------------------------------------------------------------------------------
Groups:
  admin:
    Message_Delay: 0 seconds
    Sound_Notify_Color: '#71a1f2&o'
  servant:
    Message_Delay: 1 seconds
    Rejoin_Cooldown: 3 seconds

# -------------------------------------------------------------------------------------------------
# Give player warning points for violating rules/actions.
# Warning points are groupped into "sets" that contain different actions based on
# how many points the player has accumulated.
# -------------------------------------------------------------------------------------------------
Warning_Points:

  # Enable this feature?
  Enabled: false

  # Automatically take away warning points gradually? Warning points are saved for offline players
  # but they are only taken away when the player is online.
  Reset_Task:

    # The delay between taking points. Set to 0 to never take points automatically.
    Period: 20 seconds

    # How much points to take from different sets. Specify a set name and how many points to take.
    # To configure sets, see below.
    # You can write your own "set: points" keys below!
    Remove:
      global: 5
      spam: 1

  # How many points to to give on certain events? The first part of the value is the set name,
  # such as "fastmessages" (see below). See Anti_Spam and Anti_Caps sections above to configure
  # when these should be triggered.
  Triggers:

    # Player wrote message too quickly.
    Chat_Delay: fastmessages 3 - {remaining_time}

    # Player wrote too similar messages after each other.
    # {similarity_percentage_double} means the % of similarity between the current message and the
    # previous one from 0.0 to 1.0
    Chat_Similarity: spam 0

    # Player wrote too many messages in a given time limit.
    # You can also use the {messages_in_period} variable to get the messages sent in the given period
    Chat_Limit: fastmessages 3

    # Player typed commands too quickly.
    Command_Delay: fastmessages 3 - {remaining_time}

    # Player typed too similar commands after each other.
    # The {similarity_percentage_double} means the % of similarity between the current command and
    # the previous one.
    Command_Similarity: spam 0

    # Player typed too many commands in the given limit (see Anti_Spam section above).
    Command_Limit: fastmessages 3

    # Player wrote messages containing too many BIG LETTERS (see Anti_Caps section above).
    Caps: spam 4 * ({caps_percentage_double} / 2)

  # Warning points are groupped into "sets" that contain different actions based on
  # how many points the player has accumulated.
  # Each set contains trigger points such as 5, with a list of commands/actions to run
  # when the player is given points from above and they match or exceed the highest set trigger,
  #
  # Example in global set: When player has 15 points and gets 5 more, we'll trigger the actions on
  # 15 points.
  #
  # You can write or remove sections below and add new trigger points at your will!
  Sets:
    global:
      5:
      - 'warn &7Please obey the &2rules &7otherwise you will be &4punished&7.'
      15:
      - 'warn &c**** &lHey &c{player} **** &7-> &cThis is your &6final &cwarning!'
      30:
      - 'kick {player} &cKicked for breaking the rules'
    swear:
      4:
      - 'warn &cYou have received first warning for swearing.'
      6:
      - 'warn &cPlease do not swear, otherwise an action will be taken!'
      8:
      - 'kick {player} &cInappropriate language (last warning)'
      20:
      - 'tempban {player} 30m autoban for swearing'
    spam:
      6:
      - 'warn &cPlease do not act like spammer.'
      10:
      - 'warn &cPlease do not spam, otherwise you will be banned.'
      12:
      - 'kick {player} &cSpamming the chat (last warning)'
      26:
      - 'tempban {player} 10m autoban for chat spam'
    fastmessages:
      6:
      - 'warn &cPlease slow down chat messages.'
      10:
      - 'warn &cSlow down chat, otherwise you will be banned.'
      14:
      - 'kick {player} &cSlow down chat (last warning)'
      30:
      - 'tempban {player} 10m autoban for chat spam'

# -------------------------------------------------------------------------------------------------
# Apply chat rules differently for new players on your server.
# -------------------------------------------------------------------------------------------------
Newcomer:

  # How much time must a player spend on the server to no longer be considered as a newcomer?
  # This is NOT the first time player joined, but the actual time he spent on your server.
  # Set to 0 to disable this feature, or set a time like "1 hour" in human readable format
  Threshold: 0 minutes

  # In which worlds should we enable this feature? Useful when you have a newbie world.
  # Example: [survival, nether, end]. Set to ["*"] to enable in all worlds.
  Worlds:
  - '*'

  # What permissions should newcomers obtain when they join?
  Permissions:
  - 'chatcontrol.group.newcomer'
  - 'chatcontrol.spy.autoenable - false'

  # Multiplier for points that newcomers receive.
  Warning_Points_Multiplier: 1.0

  # Prevent newcomers from seeing chat messages?
  Restrict_Seeing_Chat: false

  # Writing to chat restrictions:
  Restrict_Chat:

    # Block newcomers from chatting ?
    Enabled: false

    # What messages should we allow anyways? Case-insensitive. Split by ", ". Example: [quit, end]
    # This is matched as "equals", no regular expressions. The message must be "equal ignore case"
    # one of the lines below to go through else it will be blocked.
    Whitelist: []

  # Command restrictions:
  Restrict_Commands:

    # Block newcomers from running any command?
    Enabled: true

    # What commands should be disallowed from being run? We check only the label such as "/tell"
    # By default this is reversed so players can only run the commands below.
    Whitelist:
    - '/login'
    - '/l'
    - '/register'
    - '/reg'
    - '/helpop'
    - '/help'
    - '/?'

# -------------------------------------------------------------------------------------------------
# Save game events to see what happened while you were offline.
# If you have MySQL enabled, these logs will go directly to your database.
# -------------------------------------------------------------------------------------------------
Log:

  # What player actions should be logged?
  # Options: chat, command, private_message, mail, sign, book, anvil
  Apply_On:
  - 'chat'
  - 'command'
  - 'private_message'
  - 'mail'
  - 'sign'
  - 'book'
  - 'anvil'

  # The threshold after which we should clean the logs
  Clean_After: 90 days

  # Commands that will be saved along with the chat messages. To log all, set it to ["*"]
  # The Apply_On list must contain "command" for any commands below to be logged.
  Command_List:
  - '/tell'
  - '/w'
  - '/m'
  - '/t'
  - '/pm'
  - '/message'
  - '/msg'
  - '/whisper'
  - '/mail'
  - '/reply'
  - '/r'
  - '/me'
  - '/tag'
  - '/nick'

# -------------------------------------------------------------------------------------------------
# Remove unwanted messages from the console.
# -------------------------------------------------------------------------------------------------
Console_Filter:

  # Should we enable this feature? *DOES NOT SUPPORT RELOAD* *MAY BREAK YOUR MULTICRAFT PANEL*
  Enabled: false

  # Remove these messages from console using the "contains" method.
  # Does not need to be whole message, just a part of the message you want to block.
  #
  # [NOTICE] If you have Multicraft, DO NOT place the following messages there else 
  #          your server will literaly stop working properly. This is a bug in Multicraft.
  # - UUID of player
  # - lost connection
  Messages:
  - 'Reached end of stream for'
  - 'Connection reset'

# -------------------------------------------------------------------------------------------------
# Third party plugin integration
# -------------------------------------------------------------------------------------------------
Integration:

  # Integration with AuthMe.
  AuthMe:

    # If true, we only show player join message (if you have "join" in Messages.Apply_On) once
    # the player logs in using AuthMe.
    Delay_Join_Message_Until_Logged: false

    # Only display the quit message if the player was logged in? Prevents quit message spam.
    # [TIP] To disable join message, enable 'delayJoinMessage' in AuthMe's configuration.
    Hide_Quit_Message_If_Not_Logged: true

  # Integration with BungeeCord.
  BungeeCord:

    # Hook to BungeeCord? **Requires BungeeControl**: https://spigotmc.org/resources/13079
    # [IMPORTANT] Change your server-name key in server.properties first!
    Enabled: false

    # The optional prefix before all messages so that you know where they are coming from.
    Prefix: ''

  # Integration with ProtocolLib.
  ProtocolLib:

    # Controls tab-completion, packet rules, deleting messages, book filtering and a few other things.
    # Disable if using ViaVersion, ProtocolSupport or some weird Spigot fork and getting kicked out
    # or having any issues.
    Listen_For_Packets: true

    # Prevent hacked clients editing and signing invalid books.
    # 1) Replace accents and remove unicode except colors and Cyrillic.
    # 2) Limit max pages to 100 and letters per page to 500
    # Requires Minecraft 1.13, but if you get "Unsupported client packet in current Minecraft.."
    # message in the console, it is incompatible with your server. 
    Book_Anti_Crash: true

  # Integration with DiscordSRV. 
  Discord:

    # Enable all integration with DiscordSRV?
    Enabled: false

    # Beta: Send player channel messages through the webhook feature of Discord? 
    Webhook: false

    # Discord does not let us edit messages, so we must remove the original message and resend
    # it as the bot. You will see your message disappear and reappear in a second or less. 
    # true = messages are sent as bot (username icons not visible)
    # false = we do not edit your discord messages (warning: this breaks antispam, rules and 
    #         removing messages on discord)
    Send_Messages_As_Bot: true

    # What chat channels should we map when sending/receiving a message to/from Discord?
    # Write <channel id>: <channel name> (the channel name must equal your ChatControl channel
    #                                     name, but not necessarily the one on Discord)
    Connected_Channels:
      0: minecraft

# -------------------------------------------------------------------------------------------------
# Show important informational messages such as what channels players is joining into, etc. ?
#
# DO NOT disable this unless you have been using ChatControl Red for a few weeks otherwise you
# will miss out and then waste time reading our Wiki and opening tickets where things could easily
# be explained simply by reading the console.
#
# If you want to disable "*--------- Rule match" messages, set Rules.Verbose to false.
#
# False also remove links to Wiki and Issue Tracker from the console when the plugin starts.
# -------------------------------------------------------------------------------------------------
Show_Tips: true

# -------------------------------------------------------------------------------------------------
# The format used in the {timestamp} placeholder (google "Java timestamp format" for options).
# -------------------------------------------------------------------------------------------------
Timestamp_Format: dd.MM.yyyy HH:mm:ss

# -------------------------------------------------------------------------------------------------
# Advanced: Affects the order in which we format and check the chat. No need to touch.
# See: https://github.com/kangarko/ChatControl-Pro/wiki/Listener-Priorities
#
# Plugins which may require changing priority of Formatter: FactionsChat, BanManager
# and WorldGuard. Visit the article above for help on how to configure.
#
# NB! DO NOT RELOAD WHEN CHANGING THIS - DO NOT RELOAD WHEN CHANGING THIS - DO NOT RELOAD...
# -------------------------------------------------------------------------------------------------
Chat_Listener_Priority: HIGHEST

# -------------------------------------------------------------------------------------------------
# What commands should trigger the main plugin command?
#
# If you have ChestCommands or another plugin with same commands, simply remove or rename ours.
# * THE FIRST ALIAS IS THE MAIN LABEL, PLEASE DO NOT REMOVE IT. *
# -------------------------------------------------------------------------------------------------
Command_Aliases:
- 'chc'

# -------------------------------------------------------------------------------------------------
# What language should we use for messages? If it exists, the language file will be copied 
# to your messages/ folder where you can edit it.
# See tutorial here: https://github.com/kangarko/ChatControl-Pro/wiki/Localization
# -------------------------------------------------------------------------------------------------
Locale: en

# -------------------------------------------------------------------------------------------------
# The prefix used in front of most chat or console messages. You can manually use it with
# {plugin_prefix} variable anywhere.
# -------------------------------------------------------------------------------------------------
Prefix: '&8[&3ChatControl&8]&7 '

# -------------------------------------------------------------------------------------------------
# Clear data.db for players that had not logged in for longer period that that.
# Set to 0 to disable.
# -------------------------------------------------------------------------------------------------
Clear_Data_If_Inactive: 30 days

# -------------------------------------------------------------------------------------------------
# Time of some plugin's operations is measured. Print a message to the console if they take
# over the specified amount of time in milliseconds. Set to -1 to disable.
# -------------------------------------------------------------------------------------------------
Log_Lag_Over_Milis: 100

# -------------------------------------------------------------------------------------------------
# List of section names that will print informative messages about their features.
# If you have issues, try enabling either of these sections to self-diagnose:
# [mysql, points, bungee, channel, operator, rules, discord, component]
# -------------------------------------------------------------------------------------------------
Debug: []

# -------------------------------------------------------------------------------------------------
# Do not change this value, otherwise it will corrupt your plugin installation!
# -------------------------------------------------------------------------------------------------
Version: 30

Minecraft Version: 1.16.5 paper 457 (chc red 10.2.3) MySQL: false BungeeCord: false

ElBananaa commented 3 years ago

Hey! Try changing '1 seconds' to '1 second'. Also, regarding the places where you specified '0 seconds', I'm not sire if this is the righr way to use it. I'll have to take a look at it in my own config file in 40 mins when I get on my computer. Anyways, if you could try the first thing and let me know if it fixes your issue.

LogGits commented 3 years ago

changing all the 1 seconds to 1 second yields the same error. 0 seconds could be the issue, i tried 0 and it gave me an error so I have to use 0 seconds. The ClassCastException occurs when people join but not for me (maybe because I have * perms?).

ElBananaa commented 3 years ago

changing all the 1 seconds to 1 second yields the same error. 0 seconds could be the issue, i tried 0 and it gave me an error so I have to use 0 seconds. The ClassCastException occurs when people join but not for me (maybe because I have * perms?).

Hey! Sorry for the delay. Please send us your /chc debug file so I can run some tests on my end.

kangarko commented 3 years ago

Banana let me take over this :) Thanks!

No need to send debug again.

kangarko commented 3 years ago

Thanks, finally fixed! Was a code flaw in the plugin