Есть ли в CMI возможность настройки чата?

TRUEC0DER

Пользователь
Сообщения
197
Решения
1
Снова взялся разбираться с CMI, и возник такой вопрос - можно ли настроить чат (глобальный и локальный) в плагине CMI? (Не бейте, я просто туповат), я там нашёл что-то похожее на настройку чата, но не очень понимаю, где можно настроить глобальный и локальный.
 
Решение
Локальный на 200 блоков, сообщение через! на весь сервер. Перед сообщением будет L или G
Авто объединение сообщений:

config.yml
Код:
  # Определяет диапазон регулярных сообщений
  # Установите -1, чтобы отключить ограничение диапазона
 GeneralRange: -1
  # Определяет диапазон кричащих сообщений для путешествий
  # Сообщения глобального чата должны начинаться с ! и игрок должен иметь разрешение cmi.chat.shout
  # GeneralRange должен быть включен
  # установите 0, чтобы кричать во всех мирах, -1, чтобы отключить
  ShoutRange: 200
Локальный на 200 блоков, сообщение через! на весь сервер. Перед сообщением будет L или G
Авто объединение сообщений:

config.yml
Код:
  # Определяет диапазон регулярных сообщений
  # Установите -1, чтобы отключить ограничение диапазона
 GeneralRange: -1
  # Определяет диапазон кричащих сообщений для путешествий
  # Сообщения глобального чата должны начинаться с ! и игрок должен иметь разрешение cmi.chat.shout
  # GeneralRange должен быть включен
  # установите 0, чтобы кричать во всех мирах, -1, чтобы отключить
  ShoutRange: 200
 
Последнее редактирование:
Локальный на 200 блоков, сообщение через! на весь сервер. Перед сообщением будет L или G
Авто объединение сообщений:

config.yml
Код:
  # Определяет диапазон регулярных сообщений
  # Установите -1, чтобы отключить ограничение диапазона
GeneralRange: -1
  # Определяет диапазон кричащих сообщений для путешествий
  # Сообщения глобального чата должны начинаться с ! и игрок должен иметь разрешение cmi.chat.shout
  # GeneralRange должен быть включен
  # установите 0, чтобы кричать во всех мирах, -1, чтобы отключить
  ShoutRange: 200
Не работает с такими настройками
 
Так работает

YAML:
Chat:
  # Will try to modify chat to display it in defined format
  ModifyChatFormat: true
  # When set to true, regular and private messages (excludes clean messages) will have additional information when hovering over it (PlaceHolderAPI supported) and can be clicked for quick reply option
  # To change default hover over messages seen on sent message, go to your locale file to Chat section
  ClickHoverMessages: true
  DiscordSRV:
    # Enables support for DiscordSRV plugin
    Enabled: false
    # Indicator which can be used as {discord} in chat format to indicate that message came from discord and not ingame
    Label: '&2[&7D&2]'
    UnlinkedLabel: '&4[&cD&4]'
  # Enables support for DynMap web chat
  DynMapChat: true
  # When set to false, each time you will use /r you will reply to person you previously sent message directly or to person who sent you message if there is none you have conversion before
  # When this set to true, players with /r will reply to person who last sent private message. This can result in confusion when using /r while getting private messages from multiple players
  ReplyToLastMessenger: true
  # If ReplyToLastMessenger is set to false, then timeOut will be taken into consideration to who you should reply
  # If you had conversation in last 120 seconds (default) then even receiving message from 3rd person, you will still reply to original player
  # If you had conversation in longer then 120 seconds period, then you will reply to latest person who send you a message
  LastMessengerTimeOut: 120
  # When set to true players will need to have cmi.command.msg.[groupname].send where [groupName] is receivers main permission group
  PrivateMessagesGroups: false
  # When set to false, web pge links in a chat will not get shortened to default [LINK] format
  TranslateLink: true
  # Defines regex when replacing url in chat with short word
  # Examples:
  # (https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,})
  # ((http|https|ftp|ftps)\:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]{2,3}(\/\S*)?
  # ((http|https|ftp|ftps)\:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]{2,3}(\/\S*)?([^\s]+)
  LinkRegex: ((http|https|ftp|ftps)\:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]{2,3}(\/\S*)?([^\s|^\)]+)
  # When set to true, particular variables in chat will be translated into items player are holding. List of variables belove
  HoverItems: true
  # Defines regex when replacing item line in chat with players item in hand information. Only works when CMI hover over chat format is enabled
  ItemRegex:
  - (\%item\%)
  - (\[item\])
  - (\%i\%)
  # Attention! This will require you to have CMI Bungee plugin which can be found at zrips.net
  # Or direct download https://www.zrips.net/cmi/
  # Do you want to enable private messaging over bungeecord
  BungeeMessages: false
  # Do you want to enable public messaging over bungeecord
  BungeePublicMessages: false
  # Do you want to enable staff messaging over bungeecord
  BungeeStaffMessages: false
  # Used for simple chat messages. Optional variables: {world} {prefix} {suffix} {group} {shout}. Supporting PlaceHolderAPI variables like %player_server%
  GeneralFormat: '{prefix}&6{displayName}&7: &r{message}'
  # Defines range of regular messages to travel
  # Set to -1 to disable range restriction
  GeneralRange: 100
  # Defines range of shout messages to travel
  # Shout messages should start with ! and player should have cmi.chat.shout permission
  # GeneralRange should be enabled
  # set to 0 to shout across all worlds, -1 to disable
  ShoutRange: 0
  # Defines cost for each shout message
  ShoutCost: 0
  # Prefix used to idicate that message should be sent to public chat instead of current players chat room
  # Set it to empty field if you want this feature to be disabled
  ChatRoomShout: '!'
  # Time in seconds you want to keep chat rooms alive before removing them
  # This only applies to empty rooms after last user leaves it
  ChatRoomLife: 3600
  # Use numeric increments to separate groups from each other. If player has more than one, then line with higher number will be used
  # Add as many lines as you need too
  # cmi.chatgroup.[id] permnission node to use
  # Permission example: cmi.chatgroup.2
  GroupFormat:
    '1': '{prefix}&f{displayName}&3: &f{message}'
    '2': '{prefix}&9{displayName}&3: &f{message}'
    '3': '{prefix}&e{displayName}&3: &f{message}'
    '4': '{prefix}&a{displayName}&3: &f{message}'
  Colors:
    # If set to true then all public messages will be filtered from color codes and will allow to colorize them with appropriate permission node
    # cmi.colors.publicmessage.[colorName]
    # Colors: black(&0), darkblue(&1), darkgreen(&2), darkaqua(&3), darkred(&4), darkpurple(&5), gold(&6), gray(&7), darkgray(&8), blue(&9), green(&a), aqua(&b), red(&c), lightpurple(&d), yellow(&e), white(&f), magic(&k), bold(&l), strikethrough(&m), underline(&n), italic(&o), reset(&r)
    PublicMessage: true
    PrivateMessage: true
    # If set to true then /me messages will be filtered from color codes and will allow to colorize them with appropriate permission node
    # cmi.colors.me.[colorName]
    me: true
    # If set to true, then color codes will get removed from text instead of leaving them if player dont have appropriate permission node for that color
    CleanUp:
      publicmessage: true
      privatemessage: true
      me: true
      signs: false
      books: true
      # List of strings to ignore when checking chat for color codes player cant use.
      # This will bypass players colorcode restrictions and will allow usage of particular chat formats
      # Applies only for public and private messages
      WhiteList:
      - '&c❤&7'
    # If set to true then nickName will be filtered from color codes when player changes it
    # cmi.colors.nickname.[colorName]
    NickName: true
Игрокам выдать разрешение на глобальный чат cmi.chat.shout
 
Так работает

YAML:
Chat:
  # Will try to modify chat to display it in defined format
  ModifyChatFormat: true
  # When set to true, regular and private messages (excludes clean messages) will have additional information when hovering over it (PlaceHolderAPI supported) and can be clicked for quick reply option
  # To change default hover over messages seen on sent message, go to your locale file to Chat section
  ClickHoverMessages: true
  DiscordSRV:
    # Enables support for DiscordSRV plugin
    Enabled: false
    # Indicator which can be used as {discord} in chat format to indicate that message came from discord and not ingame
    Label: '&2[&7D&2]'
    UnlinkedLabel: '&4[&cD&4]'
  # Enables support for DynMap web chat
  DynMapChat: true
  # When set to false, each time you will use /r you will reply to person you previously sent message directly or to person who sent you message if there is none you have conversion before
  # When this set to true, players with /r will reply to person who last sent private message. This can result in confusion when using /r while getting private messages from multiple players
  ReplyToLastMessenger: true
  # If ReplyToLastMessenger is set to false, then timeOut will be taken into consideration to who you should reply
  # If you had conversation in last 120 seconds (default) then even receiving message from 3rd person, you will still reply to original player
  # If you had conversation in longer then 120 seconds period, then you will reply to latest person who send you a message
  LastMessengerTimeOut: 120
  # When set to true players will need to have cmi.command.msg.[groupname].send where [groupName] is receivers main permission group
  PrivateMessagesGroups: false
  # When set to false, web pge links in a chat will not get shortened to default [LINK] format
  TranslateLink: true
  # Defines regex when replacing url in chat with short word
  # Examples:
  # (https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,})
  # ((http|https|ftp|ftps)\:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]{2,3}(\/\S*)?
  # ((http|https|ftp|ftps)\:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]{2,3}(\/\S*)?([^\s]+)
  LinkRegex: ((http|https|ftp|ftps)\:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]{2,3}(\/\S*)?([^\s|^\)]+)
  # When set to true, particular variables in chat will be translated into items player are holding. List of variables belove
  HoverItems: true
  # Defines regex when replacing item line in chat with players item in hand information. Only works when CMI hover over chat format is enabled
  ItemRegex:
  - (\%item\%)
  - (\[item\])
  - (\%i\%)
  # Attention! This will require you to have CMI Bungee plugin which can be found at zrips.net
  # Or direct download https://www.zrips.net/cmi/
  # Do you want to enable private messaging over bungeecord
  BungeeMessages: false
  # Do you want to enable public messaging over bungeecord
  BungeePublicMessages: false
  # Do you want to enable staff messaging over bungeecord
  BungeeStaffMessages: false
  # Used for simple chat messages. Optional variables: {world} {prefix} {suffix} {group} {shout}. Supporting PlaceHolderAPI variables like %player_server%
  GeneralFormat: '{prefix}&6{displayName}&7: &r{message}'
  # Defines range of regular messages to travel
  # Set to -1 to disable range restriction
  GeneralRange: 100
  # Defines range of shout messages to travel
  # Shout messages should start with ! and player should have cmi.chat.shout permission
  # GeneralRange should be enabled
  # set to 0 to shout across all worlds, -1 to disable
  ShoutRange: 0
  # Defines cost for each shout message
  ShoutCost: 0
  # Prefix used to idicate that message should be sent to public chat instead of current players chat room
  # Set it to empty field if you want this feature to be disabled
  ChatRoomShout: '!'
  # Time in seconds you want to keep chat rooms alive before removing them
  # This only applies to empty rooms after last user leaves it
  ChatRoomLife: 3600
  # Use numeric increments to separate groups from each other. If player has more than one, then line with higher number will be used
  # Add as many lines as you need too
  # cmi.chatgroup.[id] permnission node to use
  # Permission example: cmi.chatgroup.2
  GroupFormat:
    '1': '{prefix}&f{displayName}&3: &f{message}'
    '2': '{prefix}&9{displayName}&3: &f{message}'
    '3': '{prefix}&e{displayName}&3: &f{message}'
    '4': '{prefix}&a{displayName}&3: &f{message}'
  Colors:
    # If set to true then all public messages will be filtered from color codes and will allow to colorize them with appropriate permission node
    # cmi.colors.publicmessage.[colorName]
    # Colors: black(&0), darkblue(&1), darkgreen(&2), darkaqua(&3), darkred(&4), darkpurple(&5), gold(&6), gray(&7), darkgray(&8), blue(&9), green(&a), aqua(&b), red(&c), lightpurple(&d), yellow(&e), white(&f), magic(&k), bold(&l), strikethrough(&m), underline(&n), italic(&o), reset(&r)
    PublicMessage: true
    PrivateMessage: true
    # If set to true then /me messages will be filtered from color codes and will allow to colorize them with appropriate permission node
    # cmi.colors.me.[colorName]
    me: true
    # If set to true, then color codes will get removed from text instead of leaving them if player dont have appropriate permission node for that color
    CleanUp:
      publicmessage: true
      privatemessage: true
      me: true
      signs: false
      books: true
      # List of strings to ignore when checking chat for color codes player cant use.
      # This will bypass players colorcode restrictions and will allow usage of particular chat formats
      # Applies only for public and private messages
      WhiteList:
      - '&c❤&7'
    # If set to true then nickName will be filtered from color codes when player changes it
    # cmi.colors.nickname.[colorName]
    NickName: true
Игрокам выдать разрешение на глобальный чат cmi.chat.shout
Круто, спасибо
А заменить можно?
 
Круто, спасибо
А заменить можно?
у меня включился локал но не глобал





[06:26:19 WARN]: java.lang.IllegalStateException: EntityTeleportEvent may only be triggered synchronously.
[06:26:19 WARN]: at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42)
[06:26:19 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
[06:26:19 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
[06:26:19 WARN]: at org.bukkit.event.Event.callEvent(Event.java:45)
[06:26:19 WARN]: at org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity.teleport(CraftEntity.java:611)
[06:26:19 WARN]: at org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity.teleport(CraftEntity.java:579)
[06:26:19 WARN]: at org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity.teleport(CraftEntity.java:573)
[06:26:19 WARN]: at CMI-9.6.7.2.jar//com.Zrips.CMI.Modules.Display.CMITextDisplay.<init>(CMITextDisplay.java:35)
[06:26:19 WARN]: at CMI-9.6.7.2.jar//com.Zrips.CMI.Modules.Chat.CMIChatBubble.generateDisplay(CMIChatBubble.java:162)
[06:26:19 WARN]: at CMI-9.6.7.2.jar//com.Zrips.CMI.Modules.Chat.CMIChatBubble.<init>(CMIChatBubble.java:41)
[06:26:19 WARN]: at CMI-9.6.7.2.jar//com.Zrips.CMI.Modules.Chat.ChatBubbleManager.showBubble(ChatBubbleManager.java:95)
[06:26:19 WARN]: at CMI-9.6.7.2.jar//com.Zrips.CMI.Modules.NickName.NickNameListener.AsyncPlayerChatEventRawConverter(NickNameListener.java:220)
[06:26:19 WARN]: at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor763.execute(Unknown Source)
[06:26:19 WARN]: at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
[06:26:19 WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77)
[06:26:19 WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[06:26:19 WARN]: at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[06:26:19 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
[06:26:19 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
[06:26:19 WARN]: at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:416)
[06:26:19 WARN]: at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:102)
[06:26:19 WARN]: at net.minecraft.server.network.PlayerConnection.chat(PlayerConnection.java:2313)
[06:26:19 WARN]: at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:2442)
[06:26:19 WARN]: at net.minecraft.server.network.PlayerConnection.lambda$handleChat$16(PlayerConnection.java:2142)
[06:26:19 WARN]: at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
[06:26:19 WARN]: at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
[06:26:19 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[06:26:19 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[06:26:19 WARN]: at java.base/java.lang.Thread.run(Thread.java:840)
 
Снова взялся разбираться с CMI, и возник такой вопрос - можно ли настроить чат (глобальный и локальный) в плагине CMI? (Не бейте, я просто туповат), я там нашёл что-то похожее на настройку чата, но не очень понимаю, где можно настроить глобальный и локальный.
You must be registered for see medias
 
Назад
Сверху Снизу