ChatManager

LocaleAPI - required.

  • The plugin allows you to flexibly configure chat channels, as well as apply various filters to messages.
  • The choice of chat channel to send a message is determined by the first character in the message.
  • Supports the JSON message format.
  • All plugin messages are multilingual.
  • Each global or world chat channel can be used from the console using commands.
Permissions:

chatmanager.chanel.chanel_name.send - Sending a message to the selected chat channel. If the player does not have permission for the channel, the default channel will be selected.
chatmanager.chanel.chanel_name.receive - Permission to view messages in the channel.
chatmanager.ignorefilter.filter_name - Ignoring the filter.
chatmanager.user.style - Ability to decorate the text.
chatmanager.user.ignore - Access to the “Ignore other players” command.
chatmanager.user.allowspam - Ignoring spam protection.
chatmanager.staff.reload - Access to the command to reload the plugin.
chatmanager.staff.bypassignore - Bypass ignoring another player.
chatmanager.staff.spy - Viewing messages that would not be visible under normal conditions. For example, local. Also, you can see the original message before various changes by the plugin.

Commands:

/chatreload - Reload plugin.
/chatignore - Ignore other player.

Message placeholders:

@player_name - mention online players.
%item - show the item from the main hand in the chat.

Default config:
# Anti-spam settings.
Antispam {
    Delay=3
    Enable=true
}
# A list of commands that a player will not be able to apply to another player if he is ignored.
BlockCommands=[
    tell,
    say,
    m,
    msg
]
# Available placeholders:
# %time% - Message time.
# %chanel% - Chanel prefix.
# %prefix% - Player prefix(Metaperm).
# %rank% - Player rank(Metaperm).
# %player% - Original player name.
# %displayname% - Custom player name.
# %suffix% - Player suffix(Metaperm).
# %world% - Player world or specified world in command.
# %region% - Region in the player's location. Optional support for RegionGuard plugin.
# %message% - Message
Chanels=[
    {
        ChanelType=Global
        Default=false
        MessageFormat="%chanel% %prefix% &7[&f%player%&7]&r %suffix%&f:&r "
        Name=Global
        NeedPerm=false
        Prefix="&7[&eG&7]&r"
        RecievePermission="chatmanager.chanel.global.recieve"
        SendPermission="chatmanager.chanel.global.send"
        Symbol="!"
    },
    {
        AllowedWorld=[
            "minecraft:overworld",
            "minecraft:the_end",
            "minecraft:the_nether"
        ]
        ChanelType=Worlds
        Default=false
        MessageFormat="%chanel% %prefix% &7[&f%player%&7]&r %suffix%&f:&r "
        Name=Worlds
        NeedPerm=false
        Prefix="&7[&2W&7]&r"
        RecievePermission="chatmanager.chanel.worlds.recieve"
        SendPermission="chatmanager.chanel.worlds.send"
        Symbol="@"
    },
    {
        ChanelType=Local
        Default=true
        MessageFormat="%chanel% %prefix% &7[&f%player%&7]&r %suffix%&f:&r "
        Name=Local
        NeedPerm=false
        Prefix="&7[&fL&7]&r"
        Range=100
        RecievePermission="chatmanager.chanel.local.recieve"
        SendPermission="chatmanager.chanel.local.send"
        Symbol="-"
    },
    {
        ChanelType=Claim
        Default=false
        MessageFormat="%chanel% %prefix% &7[&f%player%&7]&r %suffix%&f:&r "
        Name=Claim
        NeedPerm=false
        Prefix="&7[&5C&7]&r"
        RecievePermission="chatmanager.chanel.claim.recieve"
        SendPermission="chatmanager.chanel.claim.send"
        Symbol="."
    }
]
# There are five types of rules. Each type has its own settings. If the settings are wrong, you may get a missing method or NPE error.
# The message that needs to be sent to the player is taken from the localization files. The rule specifies only the path to the section with the message. The message sent to the player can be used in any rule if you need it.
# You can see other examples of rules by following this link to the page of the plugin from which I borrowed the idea of filter types - https://www.spigotmc.org/resources/bungeechatfilter.20596/
Filters=[
    {
        DontSendMessage=false
        FilterName=AntiCaps
        IgnoreChanels=[]
        RuleType=AntiCaps
    },
    {
        DontSendMessage=false
        FilterName=Replace
        IgnoreChanels=[]
        Regex="(?i).*give me op.*|.*can i have op.*"
        ReplaceRule {
            ReplaceTo="Ban me please!"
        }
        RuleType=Replace
    },
    {
        DontSendMessage=true
        FilterName=Punish
        IgnoreChanels=[]
        PunishRule {
            Ban=false
            Kick=true
        }
        Regex="(?i)(f+u+c+k+|f+u+k+|f+v+c+k+|f+u+q+)"
        RuleType=Punish
        SendMessage=[
            RulesMessages,
            NoExpressions
        ]
    },
    {
        DontSendMessage=false
        FilterName=ShowOnlySelf
        IgnoreChanels=[]
        Regex="(^.*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*$)|(^.*((mc|play)\\.(.*)\\.(com|net))|((.+)\\.(.*(mine|craft).*)\\.(com|net)).*$)"
        RuleType=ShowOnlySelf
    },
    {
        CommandRule {
            Commands=[
                "tell %player% Command rule is working!"
            ]
        }
        DontSendMessage=true
        FilterName=Command
        IgnoreChanels=[]
        Regex="test command rule"
        RuleType=Command
    }
]
# If true, then the localization files will use the json string format, which allows you to add functionality to the plugin's messages.
# If false, then regular strings with formatting using `&` character will be used.
# After changing this parameter, you need to delete the localization files and restart the server.
JsonLocales=true
# The identifier of the sound the player will hear when mentioned in the chat.
MentionSound="minecraft:block.note_block.guitar"
# Setting up placeholders. Here you can set the display of some text or automatic command input. These settings do not apply to the `%message%` placeholder.
PlaceholderKeys=[
    {
        Actions=[
            {
                Action="/tell %player% Hello!"
                ActionType=RunCommand
            }
        ]
        Key="%prefix%"
    },
    {
        Actions=[
            {
                Action="/tell %player% Hello!"
                ActionType=SuggestCommand
            }
        ]
        Key="%player%"
    },
    {
        Actions=[
            {
                Action="&e%time%"
                ActionType=ShowText
            }
        ]
        Key="%chanel%"
    }
]

Category: Chat

Published on Nov 28, 2022

views

stars

watchers

total downloads

Promoted Versions

Pages

Members