Zrips / CMI

116 stars 98 forks source link

Weird bug in CMI when update to 1.19.1 #7108

Closed abenraged closed 2 years ago

abenraged commented 2 years ago

Description of Issue

Hi i dont use chat filter also i dont change any option like this and today when update cmi i saw this error ShooterScreenshot-152-31-07-22

Server info:

Version Information

:22:10 INFO]: --------------------------------------------------
[18:22:10 INFO]: CMI: 9.2.3.0 BungeeCord  SqLite
[18:22:10 INFO]: CMILib: 1.2.3.1
[18:22:10 INFO]: Server: Purpur 1.19-R0.1-SNAPSHOT
[18:22:10 INFO]: CMI economy: WLACZONE Vault: 1.7.3-b131(CMIEInjector) CMI Chat: WLACZONE
[18:22:10 INFO]: Modules -> 53 enabled 3 disabled: tablist, playerCombat, votifier
[18:22:10 INFO]: --------------------------------------------------

Errors

[18:10:04 ERROR]: [CMI] Plugin CMI v9.2.3.0 has failed to register events for class com.Zrips.CMI.Modules.ChatFilter.ChatFilterListener1_19 because org/bukkit/event/player/AsyncPlayerChatPreviewEvent does not exist.

Relevant Config Sections

ChatFilter:
  Enabled: false
  Deny:
    ipBlock:
      # If not set to true, this filter will not be used
      Enabled: true
      # Defines filter group and defines required permission node to bypass this filter: cmi.chatfilter.bypass.[groupName]
      Group: Advertising
      # When set to true, each time player triggers filter, console will receive information about who triggered it, which filter and with what message
      InformConsole: true
      # Regex expression to filter by. How to use regex https://regexone.com/
      Regex:
      - '[a-zA-Z0-9\-\.]+\s?(\.|dot|\(dot\)|-|;|:|,|_|\/)\s?([a-zA-Z]{2}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)\b'
      - \b[0-9]{1,3}(\.|dot|\(dot\)|-|;|:|,|(\W|\d|_)*\s)+[0-9]{1,3}(\.|dot|\(dot\)|-|;|:|,|(\W|\d|_)*\s)+[0-9]{1,3}(\.|dot|\(dot\)|-|;|:|,|(\W|\d|_)*\s)+[0-9]{1,3}\b
      # With what we need to replace word, if not defined found expression will not be changed
      ReplaceWith: ''
      # possible: none, others, all
      # Where 'none' means everyone will receive this message
      # 'others' means that sender will get message but not other players, this is usefull to prevent advertising and silently block it
      # 'all' means that no one will receive sent message
      BlockType: others
      # When enabled rule will be applied to private messages
      includePrivateMessages: true
      # Players with cmi.chatfilter.inform permission will receive defined message when rule is broken
      msgToStaff: '&4!&6[playerName] &4advertising with: &r[message]'
      # List of commands to perform when rule is broken. Use [senderName] to include message sender name. Supports global variables same as locale file
      # Use [message] to include original players message
      # Use [updatedmessage] to include new modified message
      Commands: []
    swearing1:
      Enabled: true
      Group: Swearing
      InformConsole: true
      Regex:
      - \bass\b|\basshole
      ReplaceWith: dude
      BlockType: none
      includePrivateMessages: true
      msgToStaff: '&4!&6[playerName] &4swearing'
      Commands:
      - msg [senderName] &eDon't swear!
    swearing2:
      Enabled: true
      Group: Swearing
      InformConsole: true
      Regex:
      - \b(?i)(f+(\W|_)*(u?)+(\W|_)*(c?)+(\W|_)*k+)
      ReplaceWith: not good
      BlockType: none
      includePrivateMessages: true
      msgToStaff: '&4!&6[playerName] &4swearing'
      Commands:
      - msg [senderName] &eDon't swear!
  # List of regex filter to exlude from block list. Usefull if you want to block all ip/host address but want to allow usage of your own server.
  WhiteList:
  - \bgoogle.\s?([a-zA-Z]{2,4})\b
  - \bspigotmc.\s?([a-zA-Z]{2,4})\b
  DuplicatedMessagePrevention:
    # When set to true, plugin will prevent spaming of same or similar messages in short time range. Can be bypased with cmi.chatfilter.spambypass permission
    Use: false
    # How much in percentage message is counted as same
    Percentage: 80
    # Defines how often in seconds you can send same/similar message
    Interval: 5
    # How many commands you can repeat before stopped for cooldown
    MinAmount: 2
  Caps:
    # When nebaled we will try to prevent chat messages with multiple capitalized letters by defined criteria
    # Can be bypassed with cmi.chatfilter.capbypass permission node
    Filter: true
    # Defines amount of letters we can ignore
    # For example ':DDD' would be made of 2 letters with 3 capitalized letters which would make it 75% capitalized
    IgnoreUnder: 6
    # Amount in percentage of capitalized letters we should not cross over.
    # In example 'GOOD thing' would be 4 capitalized and 5 not, spaces gets ignored, whic makes it 44% capitalized and passes check
    Percentage: 50
    # List of commands you want to perform when player uses too many caps
    Commands:
    - asConsole! cmi titlemsg [playerName] &cZA DUZO CAPSLOCKA -keep:20
    # List of messages, excluding color codes, player can use even if it 100% capitalized
    WhiteList:
    - AFAIK
    - AFK
    - BRB
    - IMHO
    - OMG
    - ROFL
    - ROFLMAO
    - LQTM
    - LSMH
    - LMHO

Relevant Plugins

No response

Agreements

CloudeLecaw commented 2 years ago

we noticed this bug also in latest papermc with 1.19. (we use papermc 1.19 #81 because with build #82 you would start with 1.19.1, what we dont wanne use for now.) when cmi loads at startup of the server.

[06:06:23] [Server thread/ERROR]: [CMI] Plugin CMI v9.2.3.0 has failed to register events for class com.Zrips.CMI.Modules.ChatFilter.ChatFilterListener1_19 because org/bukkit/event/player/AsyncPlayerChatPreviewEvent does not exist.

there is no other error in the console after this. also we didnt se what does this mean for the workage of cmi for us, because all out cmi things seem to work... or something didnt because of this?

[06:14:02 INFO]: --------------------------------------------------
[06:14:02 INFO]: CMI Pluginversion: 9.2.3.0 MySQL
[06:14:02 INFO]: CMILib: 1.2.3.1 
[06:14:02 INFO]: Server: Paper(81) 1.19-R0.1-SNAPSHOT
[06:14:02 INFO]: CMI Economy: Aktiviert Vault: 1.7.3-b131(CMIEInjector) CMI Chat: Aktiviert 
[06:14:02 INFO]: Module -> 56 aktiviert 0 deaktiviert: 
[06:14:02 INFO]: --------------------------------------------------

abenraged commented 2 years ago

Hi

But this bug start show for me when i update CMI and CMILIB for the latest version.

CloudeLecaw commented 2 years ago

jup. i lnow. but i aspect it will be fixed with next Version.

Zrips commented 2 years ago

Got resolved