### Clickable Command Prefix (YAML) Source: https://chat.advancedplugins.net/guides/prefix-guide Sets up a clickable prefix that executes a command when clicked by a player. This example configures the prefix to suggest a private message command to the player whose name is in the prefix. ```yaml click: 'SUGGEST_COMMAND:/msg %player_name% ' ``` -------------------------------- ### Manage Chat Games Source: https://chat.advancedplugins.net/for-developers/api Provides methods to start a chat game and retrieve all available chat games. It interacts with a ChatGame object and returns a HashMap of games. ```Java public void startRandomChatGame(@NotNull ChatGame game) {} public @NotNull HashMap getChatGames() {} ``` -------------------------------- ### Configure Math Chat Game - games/solve.yml Source: https://chat.advancedplugins.net/features/chat-games This YAML configuration file sets up a math-based chat game. It defines game parameters such as duration, start messages, win conditions, and rewards for the winner. It also specifies messages for when no winner is found within the time limit. ```yaml # Is Chat Game enabled? enabled: true # How long should the game last? length: 15 # Game start routine. This is where you can configure the game start message and requirements. gameStart: effects: - 'SET_VARIABLE:math:8+7,12-5,9*3,16/4,15+6,20-9,7*4,18/3,5+8,14-7,6*5,21/3,11+4,25-10,8*2 ' - 'SET_VARIABLE:mathresult:%custom_math%' - "BROADCAST: " - "BROADCAST: &d&lCHAT GAME" - "BROADCAST: &fThe first person calculate &d%custom_math% &fwill win the game!" - "BROADCAST: " # Game end routine when someone wins. This is where you can configure the game end message and rewards. gameEndWinner: type: ON_MESSAGE conditions: - "%message% = %custom_mathresult% : %allow%" effects: - "BROADCAST: " - "BROADCAST: &d&lCHAT GAME" - "BROADCAST: &fThe game has ended! &e%player name% &fwas the first calculate &e%custom_math% = %custom_mathresult%&f!" - "BROADCAST: " - "CONSOLE_COMMAND:eco give %player name% 250" # Game end routine when time runs out. This is where you can configure the game end message and rewards. gameEndNoWinner: effects: - "BROADCAST: " - "BROADCAST: &d&lCHAT GAME" - "BROADCAST: &dNo one &fwas able to calculate calculate &d%custom_math% = %custom_mathresult%&f in time!" - "BROADCAST: &fThe game has ended! Better luck next time." - "BROADCAST: " ``` -------------------------------- ### Customize 'Unknown Command' Message (YAML) Source: https://chat.advancedplugins.net/features/chat-text-customizer This configuration example demonstrates how to customize the default 'Unknown command' message in a Minecraft server chat. It uses YAML to define the matching type, the original message, and the replacement message, allowing for custom text and formatting. ```yaml unknownCommand: findType: EQUALS find: '&fUnknown command. Type "/help" for help.' replace: 0: from: '&fUnknown command. Type "/help" for help.' to: '&cYou''ve typed an unknown command! Type "/help" for help or use "/discord" to join our Discord server!' ``` -------------------------------- ### Control Chat Games Source: https://chat.advancedplugins.net/for-developers/api Methods to check the status of chat games and manage their execution. Includes support for starting specific or random games. ```java public boolean areChatGamesEnabled() {} public @Nullable ChatGame getRunningChatGame() {} public boolean isChatGameRunning() {} public void startChatGame(@NotNull ChatGame game) {} ``` -------------------------------- ### AdvancedChatAPI - Chat Channel Management Source: https://chat.advancedplugins.net/for-developers/api This Java code snippet demonstrates the AdvancedChatAPI methods for managing chat channels. It includes functionalities to retrieve, check existence, list all channels, and get channels allowed for a specific sender. Dependencies include net.advancedplugins.chat.api.* and org.jetbrains.annotations.*. ```java package net.advancedplugins.chat.api; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.Set; import java.util.UUID; import org.bukkit.entity.Player; import org.bukkit.command.CommandSender; public class AdvancedChatAPI { @Getter private static final AdvancedChatAPI api = new AdvancedChatAPI(); /** * Retrieves a chat channel by its name. * * @param channelName The name of the chat channel. * @return The chat channel if found, otherwise null. */ public @Nullable ChatChannel getChatChannel(@NotNull String channelName) {} /** * Checks if a chat channel exists by its name. * * @param channelName The name of the chat channel. * @return True if the chat channel exists, otherwise false. */ public boolean isChatChannel(@NotNull String channelName) {} /** * Retrieves a list of all chat channels. * * @return A list of all chat channels. */ public @NotNull List getChatChannels() {} /** * Retrieves a list of chat channels allowed for a command sender. * * @param sender The command sender. * @return A list of allowed chat channels for the sender. */ public @NotNull List getAllowedChatChannels(@NotNull CommandSender sender) {} /** * Retrieves the chat channel of a player by their UUID. * * @param uuid The UUID of the player. * @return The player's chat channel if found, otherwise null. */ public @Nullable ChatChannel getPlayerChatChannel(@NotNull UUID uuid) {} /** * Checks if a player is in a chat channel. * * @param uuid The UUID of the player. * @return True if the player is in a chat channel, otherwise false. */ public boolean isPlayerInChannel(@NotNull UUID uuid) {} /** * Attempts to make a player join a chat channel by their UUID and channel name. * * @param uuid The UUID of the player. * @param channelName The name of the chat channel. * @return True if the player successfully joined the channel, otherwise false. */ public boolean joinChatChannel(@NotNull UUID uuid, @NotNull String channelName) {} /** * Makes a player join a chat channel by their UUID and channel object. * * @param uuid The UUID of the player. * @param channel The chat channel object. * @return True if the player successfully joined the channel, otherwise false. */ public boolean joinChatChannel(@NotNull UUID uuid, @NotNull ChatChannel channel) {} /** * Makes a player leave their current chat channel. * * @param uuid The UUID of the player. */ public void leaveChatChannel(@NotNull UUID uuid) {} /** * Makes a player leave a specific chat channel by their UUID and channel name. * * @param uuid The UUID of the player. * @param channelName The name of the chat channel. * @return True if the player successfully left the channel, otherwise false. */ public boolean leaveChatChannel(@NotNull UUID uuid, @NotNull String channelName) {} /** * Makes a player leave a specific chat channel by their UUID and channel object. * * @param uuid The UUID of the player. * @param channel The chat channel object. * @return True if the player successfully left the channel, otherwise false. */ public boolean leaveChatChannel(@NotNull UUID uuid, @NotNull ChatChannel channel) {} /** * Retrieves a set of channels spied by a player. * * @param player The player. * @return A set of channels spied by the player. */ public @NotNull Set getSpiedChannels(@NotNull Player player) {} /** * Enables or disables spying on all channels for a player. * * @param player The player. * @param enable True to enable, false to disable. */ public void setAllChannelSpy(@NotNull Player player, boolean enable) {} /** * Checks if a player is spying on all channels. * * @param player The player. * @return True if the player is spying on all channels, otherwise false. */ public boolean isSpyingOnAllChannels(@NotNull Player player) {} /** * Checks if a player is spying on a specific channel by name. * * @param player The player. * @param channelName The name of the chat channel. * @return True if the player is spying on the channel, otherwise false. */ ``` -------------------------------- ### Manage Chat Tags Source: https://chat.advancedplugins.net/for-developers/api Handles chat tag retrieval and assignment for players. It allows getting tags by name, retrieving a player's tag name or object, and setting tags using names or objects. ```Java public @Nullable ChatTag getChatTag(@NotNull String tagName) {} public @Nullable String getPlayerChatTagName(@NotNull Player player) {} public @Nullable ChatTag getPlayerChatTag(@NotNull Player player) {} public void setChatTag(@NotNull Player player, @NotNull String tagName) {} public void setChatTag(@NotNull Player player, @NotNull ChatTag tag) {} ``` -------------------------------- ### Create a Player Report Command (YAML) Source: https://chat.advancedplugins.net/features/custom-commands This YAML configuration defines a custom '/report' command. It specifies how to handle valid and invalid arguments, including sending messages and broadcasting permissions. It utilizes placeholders for arguments and conditional logic for effect execution. ```yaml baseCommand: /report description: Report player command: - effects: - "MESSAGE:&cCommand usage: /report ! %arg length% < 2 : %allow%" - "BROADCAST_PERMISSION:advancedchat.admin:&c[Report] %player name% &fhas reported &c%arg-1% &ffor &c%arg-2-END% %arg length% >= 2 : %allow%" - "MESSAGE:&fYour report has been submitted! Thank you for helping us keep the server clean! %arg length% >= 2 : %allow%" invalidArgs: - effects: - "MESSAGE:&cCommand usage: /report !" ``` -------------------------------- ### Configure Warning Thresholds in YAML Source: https://chat.advancedplugins.net/features/auto-moderation This configuration snippet defines automated actions based on warning thresholds. It specifies that a player is kicked at 3 warnings and muted for 10 minutes at 4 warnings. ```yaml warn: thresholds: 3: commands: - "kick %player% Excessive warnings" 4: commands: - "mute %player% 10m Excessive warnings" ``` -------------------------------- ### Basic Prefix Configuration (YAML) Source: https://chat.advancedplugins.net/guides/prefix-guide Defines a basic text prefix for chat messages. This is the simplest way to set a prefix, allowing you to define a static text that will appear before player names. It's a core part of customizing the chat format. ```yaml prefix: text: '[Member]' ``` -------------------------------- ### Hover Text Configuration (YAML) Source: https://chat.advancedplugins.net/guides/prefix-guide Configures hover text for chat prefixes, displaying additional player information when the prefix is hovered over. It utilizes PlaceholderAPI to fetch dynamic data such as player name, balance, health, and playtime. ```yaml hover: - '%player_name% Information:' - ' Balance: %vault_eco_balance%' - ' Health: %player_health%/%player_max_health% ❤' - ' Level: %player_level%' - ' Playtime: %statistic_hours_played% Hours' ``` -------------------------------- ### Player and Server Placeholders Source: https://chat.advancedplugins.net/main/placeholderapi-placeholders Placeholders for retrieving player identity and server information. ```APIDOC ## Player and Server Placeholders ### Description Retrieves information related to the player's identity, display name, and server context. ### Placeholders - `%player_name%` - Returns the player's username. - `%advancedchat_player_name_colored%` - Returns the player's username with applied name colors. - `%player_head_N_I%` - Renders a player head (N=block amount, I=index). - `%player_displayname%` - Returns the player's nickname. - `%sender_server%` / `%player_server%` / `%advancedchat_server%` - Returns the server name (fallback to 'none'). ``` -------------------------------- ### Open Chat Menus Source: https://chat.advancedplugins.net/for-developers/api Provides functionality to open chat color and chat tags menus for a player. These methods take a Player object as input and do not return a value. ```Java public void openChatColorMenu(@NotNull Player player) {} public void openChatTagsMenu(@NotNull Player player) {} ``` -------------------------------- ### Configure Chat Color Menu (YAML) Source: https://chat.advancedplugins.net/features/chat-color-gui This YAML configuration defines the structure and appearance of the chat color selection menu. It specifies the menu's name, size, item placements, and the properties of color options, including display names, materials, and player actions like clearing color or applying a selected color. It also outlines settings for placeholder items and items displayed when a player lacks permission. ```yaml name: "&aChat Color" size: 36 items: filler: type: BLACK_STAINED_GLASS_PANE name: ' ' 31: type: PAPER name: '&cClear your chat color.' action: CLEAR_COLOR settings: # Slots in which colors can be displayed colorSlots: 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 colorItem: name: "%color name% &rChat Color" lore: - '&7Click here to enable this chat color.' noPermissionItem: name: "%color name% &rChat Color" lore: - '&cYou do not have permission to use this chat color.' - '&7You can purchase this chat color at &bour store!' # Permission: advancedchat.chatcolor. e.g. advancedchat.color.white colors: white: format: "%message%" name: "&fWhite" material: WHITE_STAINED_GLASS_PANE ``` -------------------------------- ### Chat Menu Management Source: https://chat.advancedplugins.net/for-developers/api APIs for opening chat-related menus for players. ```APIDOC ## POST /api/chat/menu/open-color ### Description Opens the chat color menu for a player. ### Method POST ### Endpoint /api/chat/menu/open-color #### Request Body - **player** (Player) - Required - The player to open the menu for. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ## POST /api/chat/menu/open-tags ### Description Opens the chat tags menu for a player. ### Method POST ### Endpoint /api/chat/menu/open-tags #### Request Body - **player** (Player) - Required - The player to open the menu for. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ``` -------------------------------- ### Chat Configuration Placeholders Source: https://chat.advancedplugins.net/main/placeholderapi-placeholders Placeholders for accessing chat channel settings, formatting, and permissions. ```APIDOC ## Chat Configuration Placeholders ### Description Provides access to current chat channel properties, formatting rules, and player chat capabilities. ### Placeholders - `%advancedchat_tag%` - Current chat tag. - `%advancedchat_channel_name%` - Display name of the current channel. - `%advancedchat_channel_cross_server%` - Boolean indicating cross-server functionality. - `%advancedchat_use_colors%` - Boolean indicating if the player has color permissions. - `%advancedchat_format%` - The active chat format name. ``` -------------------------------- ### Manage Player Ignore Lists Source: https://chat.advancedplugins.net/for-developers/api Methods to add, remove, and verify ignored players. Includes bulk operations to ignore or unignore all players and check for global ignore status. ```java public @NotNull Set getIgnoredPlayers(@NotNull Player player) {} public void setAllPlayerIgnore(@NotNull Player player) {} public void removeAllPlayerIgnore(@NotNull Player player) {} public boolean hasAllPlayersIgnored(@NotNull Player player) {} public boolean hasPlayerIgnored(@NotNull Player player, @NotNull String playerName) {} public boolean removePlayerIgnore(@NotNull Player player, @NotNull String playerName) {} public boolean addPlayerIgnore(@NotNull Player player, @NotNull String playerName) {} ``` -------------------------------- ### Manage Chat Formats Source: https://chat.advancedplugins.net/for-developers/api Utilities for adding and retrieving chat formatting configurations. Allows fetching formats by name or based on the command sender. ```java public void addChatFormat(@NotNull String formatName, @NotNull ChatFormat format) {} public @NotNull ChatFormat getSenderChatFormat(@NotNull CommandSender sender) {} public @Nullable ChatFormat getChatFormat(@NotNull String formatName) {} ``` -------------------------------- ### Configure Swearing Filter and Action Source: https://chat.advancedplugins.net/features/ai-chat-moderation This configuration defines the parameters for the swearing filter. It includes enabling the filter, setting a confidence threshold for AI detection (recommended 0.9+), and specifying the action to take, such as warning the player with a customizable message. ```yaml filters: swearing: enabled: true threshold: 0.9 action: - "warn %player% Swearing is not allowed!" ``` -------------------------------- ### Handle Custom Commands Source: https://chat.advancedplugins.net/for-developers/api Provides functionality to register, unregister, and query custom commands. Includes methods to retrieve the full map of registered commands. ```java public boolean isCustomCommand(@NotNull String cmdOrAlias) {} public boolean registerCustomCommand(@NotNull String key, @NotNull CustomCommand customCommand) {} public boolean unregisterCustomCommand(@NotNull String name) {} public @NotNull Map getCustomCommands() {} ``` -------------------------------- ### Manage Spy and Bypass Settings Source: https://chat.advancedplugins.net/for-developers/api Methods to retrieve spied players, enable global spying, and check for bypass permissions. ```java public boolean canBypassIgnore(@NotNull Permissible permissible) {} public @NotNull Set getSpiedPlayers(@NotNull Player player) {} public void setAllPlayerSpy(@NotNull Player player) {} ``` -------------------------------- ### Command Permission Placeholders Source: https://chat.advancedplugins.net/main/placeholderapi-placeholders Placeholders to check if a player has permission to use specific AdvancedChat commands. ```APIDOC ## Command Permission Placeholders ### Description Checks if the player is authorized to execute specific AdvancedChat commands. ### Placeholders - `%advancedchat_command_msg%` - Permission check for /msg. - `%advancedchat_command_ignore%` - Permission check for /ignore. - `%advancedchat_command_reply%` - Permission check for /reply. - `%advancedchat_command_channels%` - Permission check for channel listing. ``` -------------------------------- ### Channel Spy Settings Source: https://chat.advancedplugins.net/for-developers/api Methods to manage player channel spying capabilities and status. ```APIDOC ## GET/POST /api/player/spy ### Description Manage or query whether a player is spying on specific channels or all channels. ### Method GET/POST ### Endpoint AdvancedChatAPI.getSpiedChannels(Player player) / setAllChannelSpy(Player player, boolean enable) ### Parameters #### Query Parameters - **player** (Player) - Required - The player object to check or modify. ### Response #### Success Response (200) - **spying** (Boolean/Set) - Returns current spy status or list of spied channels. #### Response Example { "isSpyingAll": false, "spiedChannels": ["staff", "admin"] } ``` -------------------------------- ### Manage Custom Chat Colors Source: https://chat.advancedplugins.net/for-developers/api Functions to retrieve custom chat colors by player or by name. Returns null if the specified color configuration does not exist. ```java public @Nullable CustomChatColor getPlayerCustomColor(@NotNull Player player) {} public @Nullable CustomChatColor getCustomColor(@NotNull String colorName) {} ``` -------------------------------- ### Manage Custom Variables Source: https://chat.advancedplugins.net/for-developers/api Provides methods for retrieving custom variables and registering new ones. It returns a Map of custom variables and allows registration with a JavaPlugin and CustomVariable object. ```Java public @NotNull Map getCustomVariables() {} public void registerCustomVariable(@NotNull JavaPlugin plugin, @NotNull CustomVariable variable) {} ``` -------------------------------- ### Channel Placeholders Source: https://chat.advancedplugins.net/main/placeholderapi-placeholders These placeholders allow for granular control over player mentions, ignoring, spying, and message visibility within chat channels. ```APIDOC ## Channel Placeholders ### Description This section details the available placeholders for managing chat channel functionalities such as mentions, ignoring, spying, and message visibility. ### Placeholders - **`%advancedchat_use_mention%`** (Boolean) - Indicates whether the player can use mentions in chat. - **`%advancedchat_allow_mentioned%`** (Boolean) - Indicates whether the player can be mentioned in chat. - **`%advancedchat_bypass_ignore_all%`** (Boolean) - Indicates whether the player can bypass ignore for all players. - **`%advancedchat_ignored_all%`** (Boolean) - Indicates whether all players are ignored by the parser. - **`%advancedchat_ignored_list%`** (List of Players) - Represents the list of players ignored by the parser. - **`%advancedchat_channel_spy_all%`** (Boolean) - Indicates whether the player is spying on all chat channels. - **`%advancedchat_channel_spy_list%`** (List of Channels) - Represents the list of chat channels being spied on by the player. - **`%advancedchat_spy_all%`** (Boolean) - Indicates whether the player is spying on all players. - **`%advancedchat_spy_list%`** (List of Players) - Represents the list of players being spied on by the player. - **`%advancedchat_hide_chat%`** (Boolean) - Indicates whether the player is hiding chat messages. - **`%advancedchat_hide_announcements%`** (Boolean) - Indicates whether the player is hiding announcements. ``` -------------------------------- ### Configure AdvancedChat channels.yml Source: https://chat.advancedplugins.net/features/channels This configuration file defines global channel settings such as auto-join behavior, prefix formatting, and individual channel properties like color, visibility, and priority. ```yaml autoJoin: true prefix: enabled: true channelPrefix: "%channel_color%[%channel_name%] " quick-message: char: '!' channels: sc: name: 'Staff Chat' color: "" alwaysVisible: true sameWorld: false range: 0 priority: 10 ``` -------------------------------- ### Configure Multiple Violation Handling Source: https://chat.advancedplugins.net/features/ai-chat-moderation This setting determines how the system handles multiple violations within a single message. When set to 'false', a player is only punished once, regardless of the number of violations detected. Setting it to 'true' would allow for individual punishments per violation. ```yaml multiple-violations: false ``` -------------------------------- ### Manage Player Spy Settings Source: https://chat.advancedplugins.net/for-developers/api Methods to add, remove, and verify spy status for players. These functions interact with the internal spy list to monitor specific player communications. ```java public void removeAllPlayerSpy(@NotNull Player player) {} public boolean isSpyingOnAllPlayers(@NotNull Player player) {} public boolean isSpyingOnPlayer(@NotNull Player player, @NotNull String playerName) {} public boolean removePlayerSpy(@NotNull Player player, @NotNull String playerName) {} public boolean addPlayerSpy(@NotNull Player player, @NotNull String playerName) {} ``` -------------------------------- ### Custom Variable Management Source: https://chat.advancedplugins.net/for-developers/api APIs for managing custom variables. ```APIDOC ## GET /api/chat/custom-variables ### Description Retrieves a map of all registered custom variables. ### Method GET ### Endpoint /api/chat/custom-variables ### Response #### Success Response (200) - **customVariables** (Map) - A map containing custom variables. ## POST /api/chat/custom-variables/register ### Description Registers a new custom variable for a JavaPlugin. ### Method POST ### Endpoint /api/chat/custom-variables/register #### Request Body - **plugin** (JavaPlugin) - Required - The JavaPlugin registering the custom variable. - **variable** (CustomVariable) - Required - The custom variable to register. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ``` -------------------------------- ### Manage Chat Rules Source: https://chat.advancedplugins.net/for-developers/api Facilitates adding and retrieving chat rules. It allows adding a rule by name and object, and retrieving a rule by name or all rules as a Map. ```Java public void addChatRule(@NotNull String ruleName, @NotNull ChatRule rule) {} public @Nullable ChatRule getChatRule(@NotNull String ruleName) {} public @NotNull Map getChatRules() {} ``` -------------------------------- ### Configure DiscordSRV Global Chat Settings Source: https://chat.advancedplugins.net/main/plugin-integrations/discordsrv Sets the UseModernPaperChatEvent to false to ensure compatibility with global message synchronization in DiscordSRV. ```yaml UseModernPaperChatEvent: false ``` -------------------------------- ### Configure Chat Format via YAML Source: https://chat.advancedplugins.net/features/chat-format This YAML configuration defines the structure of a chat format, including priority, interactive tooltips, click actions, and message range. It serves as a template for creating custom chat styles within the AdvancedChat plugin. ```yaml priority: 100 prefix: text: '[Member]' tooltip: - '%player_name% Information:' - 'Balance: &f%vault_eco_balance%' click: 'RUN_COMMAND:/list' name: text: " %player_name%" tooltip: - '%player_name% Information:' - 'Balance: %vault_eco_balance%' click: 'RUN_COMMAND:/list' suffix: text: ' %advancedchat_tag%: ' tooltip: - '' click: '' chat: text: '%message%' tooltip: - 'This is a message sent by %player_name%' click: '' range: 0.0 ``` -------------------------------- ### MiniMessage Formatting Tags Source: https://chat.advancedplugins.net/main/gradients-toasts-and-more Endpoints and syntax for applying styles, colors, and interactive elements to chat messages using MiniMessage. ```APIDOC ## MiniMessage Formatting ### Description Apply advanced text formatting including gradients, fonts, and interactive click/insertion events. ### Tags - **Gradient**: `` - Create color gradients. - **Transition**: `` - Smooth color transitions. - **Font**: `` - Change text font. - **Small Caps**: `text` - Convert to small caps. - **Selector**: `` - Insert entity selectors. - **Insertion**: `` - Allow shift-click text insertion. - **Click**: `` - Add interactive click events. - **Reset**: `` - Reset all formatting. ### Example `Click to show the world seed!` ``` -------------------------------- ### Manage Player Join Messages Source: https://chat.advancedplugins.net/for-developers/api Allows retrieval of the join message format for a specific player. It takes a Player object as input and returns a JoinMessage object or null. ```Java public @Nullable JoinMessage getJoinMessageFormat(@NotNull Player player) {} ``` -------------------------------- ### Configure Custom Variable in YAML Source: https://chat.advancedplugins.net/features/custom-variables Defines a custom variable named 'item' that dynamically displays the player's held item quantity and name. It utilizes the Nashorn engine to execute JavaScript and configures a hover effect to show the item details. ```yaml type: CHAT_MESSAGE name: item value: '"x"+player.getItemInHand().getAmount() + " " + capitalize(player.getItemInHand().getType().name())' hover: player.getItemInHand() ``` -------------------------------- ### Chat Channel Management Source: https://chat.advancedplugins.net/for-developers/api Methods for retrieving, checking, and listing chat channels within the system. ```APIDOC ## GET /api/channels ### Description Retrieve information about chat channels, including searching by name or listing all available channels. ### Method GET ### Endpoint AdvancedChatAPI.getChatChannel(String channelName) / getChatChannels() ### Parameters #### Path Parameters - **channelName** (String) - Required - The unique name of the chat channel. ### Response #### Success Response (200) - **ChatChannel** (Object) - The channel object if found, otherwise null. #### Response Example { "channel": "global", "exists": true } ``` -------------------------------- ### Player Channel Membership Source: https://chat.advancedplugins.net/for-developers/api Methods for managing which channel a player is currently in and handling join/leave actions. ```APIDOC ## POST /api/player/channel ### Description Allows a player to join or leave a specific chat channel using their UUID. ### Method POST ### Endpoint AdvancedChatAPI.joinChatChannel(UUID uuid, String channelName) / leaveChatChannel(UUID uuid) ### Parameters #### Request Body - **uuid** (UUID) - Required - The player's unique identifier. - **channelName** (String) - Required - The name of the channel to join. ### Response #### Success Response (200) - **success** (Boolean) - Returns true if the operation was successful. #### Response Example { "success": true } ``` -------------------------------- ### Player Chat Settings Source: https://chat.advancedplugins.net/for-developers/api APIs for managing player-specific chat settings like join messages and chat tags. ```APIDOC ## GET /api/chat/player/join-message ### Description Retrieves the join message format for a specific player. ### Method GET ### Endpoint /api/chat/player/join-message #### Query Parameters - **player** (Player) - Required - The player to get the join message format for. ### Response #### Success Response (200) - **joinMessageFormat** (JoinMessage) - The join message format if set, otherwise null. ## GET /api/chat/player/chat-tag-name ### Description Retrieves the chat tag name associated with a player. ### Method GET ### Endpoint /api/chat/player/chat-tag-name #### Query Parameters - **player** (Player) - Required - The player to get the chat tag name for. ### Response #### Success Response (200) - **tagName** (string) - The chat tag name if set for the player, otherwise null. ## GET /api/chat/player/chat-tag ### Description Retrieves the chat tag object associated with a player. ### Method GET ### Endpoint /api/chat/player/chat-tag #### Query Parameters - **player** (Player) - Required - The player to retrieve the chat tag for. ### Response #### Success Response (200) - **chatTag** (ChatTag) - The chat tag associated with the player, or null if not found. ## POST /api/chat/player/set-chat-tag-by-name ### Description Sets a chat tag for a player using the tag name. ### Method POST ### Endpoint /api/chat/player/set-chat-tag-by-name #### Request Body - **player** (Player) - Required - The player to set the chat tag for. - **tagName** (string) - Required - The name of the chat tag to set. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ## POST /api/chat/player/set-chat-tag-by-object ### Description Sets a chat tag for a player using a ChatTag object. ### Method POST ### Endpoint /api/chat/player/set-chat-tag-by-object #### Request Body - **player** (Player) - Required - The player to set the chat tag for. - **tag** (ChatTag) - Required - The ChatTag object to set. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ``` -------------------------------- ### Chat Game Management Source: https://chat.advancedplugins.net/for-developers/api APIs for managing and retrieving chat games. ```APIDOC ## POST /api/chat/games/start ### Description Starts a new chat game. ### Method POST ### Endpoint /api/chat/games/start ### Parameters #### Request Body - **game** (ChatGame) - Required - The chat game to start. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ## GET /api/chat/games ### Description Retrieves all available chat games. ### Method GET ### Endpoint /api/chat/games ### Response #### Success Response (200) - **games** (Map) - A map containing all chat games. ``` -------------------------------- ### Manage Channel Spying Source: https://chat.advancedplugins.net/for-developers/api Methods to add, remove, and check the status of channel spying for a specific player. These methods accept either a channel name or a ChatChannel object. ```java public boolean isSpyingOnChannel(@NotNull Player player, @NotNull String channelName) {} public boolean isSpyingOnChannel(@NotNull Player player, @NotNull ChatChannel channel) {} public boolean removeChannelSpy(@NotNull Player player, @NotNull String channelName) {} public boolean removeChannelSpy(@NotNull Player player, @NotNull ChatChannel channel) {} public boolean addChannelSpy(@NotNull Player player, @NotNull String channelName) {} public boolean addChannelSpy(@NotNull Player player, @NotNull ChatChannel channel) {} ``` -------------------------------- ### Restrict Channel Access via LuckPerms Source: https://chat.advancedplugins.net/main/common-issues These commands deny a user the ability to join, leave, or automatically join a specific chat channel. By setting these to false, you override the default OP permissions for channel management. ```shell /lp user USER permission set advancedchat.channel.join. false /lp user USER permission set advancedchat.channel.leave. false /lp user USER permission set advancedchat.channel.autojoin. false ``` -------------------------------- ### AdvancedChat Channel Configuration Source: https://chat.advancedplugins.net/main/plugin-integrations/discordsrv Defines channel settings in AdvancedChat, including prefixes, click actions, and channel-specific permissions. ```yaml autoJoin: true prefix: enabled: true channelPrefix: "%channel_color%[%channel_name%] " hover: - 'Join %channel_name%' click: "SUGGEST_COMMAND:!%channel_id% " quickMessage: char: '!' channels: sc: name: 'Staff Chat' color: "" alwaysVisible: true sameWorld: false range: 0 priority: 10 ``` -------------------------------- ### Configure Caps Rule in YAML Source: https://chat.advancedplugins.net/features/chat-rules This YAML configuration defines a chat rule to detect and manage excessive capitalization. It checks the percentage of capitalized letters in a message and applies effects like canceling the event and sending a warning message to the player. Permissions can be used to exempt certain players. ```yaml # Configuration for Caps in Chat enabled: true conditions: - '%permissions% contains advancedchat.caps || %is op% = true : %stop%' - '%caps_percentage% > 70 : %allow%' effects: - 'CANCEL_EVENT' - 'MESSAGE:&c&l(!) &c%player name%, please do not use excessive caps.' # - 'CONSOLE_COMMAND:warn %player name% Caps' # you could also warn the player here ``` -------------------------------- ### Enable Chat Logging Source: https://chat.advancedplugins.net/features/ai-chat-moderation This configuration enables logging for the AI chat filter. When enabled, all messages flagged for violations, along with violation details, are recorded in the console, aiding in monitoring and analysis. ```yaml logging: enabled: true ``` -------------------------------- ### Enable RespectChatPlugins in DiscordSRV Source: https://chat.advancedplugins.net/main/plugin-integrations/discordsrv Ensures that DiscordSRV respects cancelled messages from other chat plugins by setting RespectChatPlugins to true. ```yaml RespectChatPlugins: true ``` -------------------------------- ### Chat Rule Management Source: https://chat.advancedplugins.net/for-developers/api APIs for managing chat rules. ```APIDOC ## POST /api/chat/rules/add ### Description Adds a new chat rule. ### Method POST ### Endpoint /api/chat/rules/add #### Request Body - **ruleName** (string) - Required - The name of the chat rule. - **rule** (ChatRule) - Required - The chat rule object. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ## GET /api/chat/rules/{ruleName} ### Description Retrieves a specific chat rule by its name. ### Method GET ### Endpoint /api/chat/rules/{ruleName} #### Path Parameters - **ruleName** (string) - Required - The name of the chat rule to retrieve. ### Response #### Success Response (200) - **rule** (ChatRule) - The chat rule if found, otherwise null. ## GET /api/chat/rules ### Description Retrieves all configured chat rules. ### Method GET ### Endpoint /api/chat/rules ### Response #### Success Response (200) - **rules** (Map) - A map containing all chat rules. ``` -------------------------------- ### Restrict Chat Format Access via LuckPerms Source: https://chat.advancedplugins.net/main/common-issues This command denies a specific user access to a defined chat format. It uses the LuckPerms permission set command to explicitly set the permission node to false. ```shell /lp user USER permission set advancedchat.format. false ``` -------------------------------- ### Toast and Notification Messages Source: https://chat.advancedplugins.net/main/gradients-toasts-and-more Syntax for sending various types of notifications and UI elements in AdvancedChat. ```APIDOC ## Notification Formats ### Description AdvancedChat supports multiple message display types including Action Bars, Titles, Boss Bars, and Achievements. ### Formats - **Chat**: `Message text` - **Action Bar**: `[ACTION_BAR]Message text` - **Title**: `[TITLE]Message text` - **Subtitle**: `[SUBTITLE]Message text` - **Boss Bar**: `[BOSS_BAR:progress:color:overlay]Message text` - `progress`: 0.0 to 1.0 - `color`: BarColor enum - `overlay`: PROGRESS, NOTCHED_6, etc. - **Achievement**: `[ACHIEVEMENT:icon:style:background]Message text` ### Example `[BOSS_BAR:1.0:GREEN:PROGRESS]Important announcement here!` ``` -------------------------------- ### Chat Tag Management Source: https://chat.advancedplugins.net/for-developers/api APIs for retrieving and managing chat tags. ```APIDOC ## GET /api/chat/tags/{tagName} ### Description Retrieves a chat tag by its name. ### Method GET ### Endpoint /api/chat/tags/{tagName} #### Path Parameters - **tagName** (string) - Required - The name of the chat tag to retrieve. ### Response #### Success Response (200) - **chatTag** (ChatTag) - The chat tag if found, otherwise null. ``` -------------------------------- ### Enable AI Chat Filter Configuration Source: https://chat.advancedplugins.net/features/ai-chat-moderation This configuration snippet enables the AI-powered chat filter. Setting 'enabled' to true activates the moderation system. This feature can be toggled off entirely if not needed. ```yaml enabled: true ``` -------------------------------- ### Swear Word Management Source: https://chat.advancedplugins.net/for-developers/api APIs for retrieving and processing swear words. ```APIDOC ## GET /api/chat/swear-words ### Description Retrieves the list of configured swear words. ### Method GET ### Endpoint /api/chat/swear-words ### Response #### Success Response (200) - **swearWords** (Set) - A set containing all swear words. ## POST /api/chat/process-message-swear ### Description Processes a message to check for swear words. ### Method POST ### Endpoint /api/chat/process-message-swear #### Request Body - **sender** (Player) - Required - The player sending the message. - **msg** (string) - Required - The message to process. ### Response #### Success Response (200) - **result** (TextResult) - The result after processing swear words. ``` -------------------------------- ### Map Discord Channels to AdvancedChat Source: https://chat.advancedplugins.net/main/plugin-integrations/discordsrv Defines the mapping between Discord channel IDs and AdvancedChat channel identifiers within the DiscordSRV configuration. ```yaml Channels: {"global": "1111111111111111111", "sc": "2222222222222222222"} ``` -------------------------------- ### Manage Swear Words Source: https://chat.advancedplugins.net/for-developers/api Enables retrieval of the swear word list and processing of messages for swear words. It returns a Set of strings for the list and a TextResult for processed messages. ```Java public @NotNull Set getSwearWordList() {} public @NotNull TextResult processMessageSwear(@NotNull Player sender, @NotNull String msg) {} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.