### Start Player Cooldown API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChatChannel Starts the cooldown timer for a specified player in a channel. The duration is determined by the channel's cooldown setting. ```APIDOC ## POST /channels/{channelId}/startCooldown ### Description Starts the cooldown timer for the specified player. Duration will be the channel cooldown. Returns the player's old cooldown time, if they have one. ### Method POST ### Endpoint /channels/{channelId}/startCooldown ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier for the chat channel. #### Request Body - **player** (string) - Required - The unique identifier of the player. ### Request Example ```json { "player": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response #### Success Response (200) - **previousCooldown** (long) - The player's old cooldown time in milliseconds, or 0 if they didn't have one. #### Response Example ```json { "previousCooldown": 0 } ``` ``` -------------------------------- ### Party Management Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer API to get the player's current party. ```APIDOC ## GET /player/{uuid}/party ### Description Gets this player's current `Party`. ### Method GET ### Endpoint /player/{uuid}/party ### Parameters #### Path Parameters - **uuid** (UUID) - Required - The unique identifier of the player. ### Response #### Success Response (200) - **party** (Party | null) - A CompletableFuture resolving to the player's current Party, or null if they are not in one. #### Response Example ```json { "party": { "id": "party_id_123", "members": ["player_uuid_1", "player_uuid_2"] } } ``` ``` -------------------------------- ### Channel Quick Prefix API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChatChannel Retrieves the message prefix for a channel. Messages starting with this prefix will be sent in this channel. ```APIDOC ## GET /channels/{channelId}/quickPrefix ### Description Messages will be sent in this channel if they start with this prefix. ### Method GET ### Endpoint /channels/{channelId}/quickPrefix ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier for the chat channel. ### Response #### Success Response (200) - **quickPrefix** (string) - The message prefix that sends messages in this channel. Can be null. #### Response Example ```json { "quickPrefix": "!" } ``` ``` -------------------------------- ### Check Channel Permissions - Java Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChannelPermissionResult Provides examples of how to check the result of a channel permission. This includes verifying if an action was permitted and retrieving the specific reason if the action was denied. ```java ChannelPermissionResult result = ChannelPermissionResult.allowed(); // Or any other way to get a result if (result.permitted()) { System.out.println("Action is permitted."); } else { Component reason = result.reason(); System.out.println("Action denied: " + reason.toString()); } ``` -------------------------------- ### Party Management Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/index-all APIs for creating, managing, and disbanding player parties. ```APIDOC ## POST /api/parties ### Description Creates a new party with a specified name. ### Method POST ### Endpoint /api/parties ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (Component) - Required - The name for the new party. ### Request Example ```json { "name": "My Awesome Party" } ``` ### Response #### Success Response (201) - **partyId** (string) - The unique identifier of the newly created party. #### Response Example ```json { "partyId": "party_12345" } ``` ``` ```APIDOC ## DELETE /api/parties/{partyId} ### Description Disbands an existing party. ### Method DELETE ### Endpoint /api/parties/{partyId} ### Parameters #### Path Parameters - **partyId** (string) - Required - The unique identifier of the party to disband. #### Query Parameters None ### Request Example None ### Response #### Success Response (204) No content is returned on successful disbandment. #### Response Example None ``` -------------------------------- ### CarbonPlayer Interface Documentation Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer Documentation for the CarbonPlayer interface, outlining methods related to player chat, permissions, and status. ```APIDOC ## CarbonPlayer Interface ### Description Generic abstraction for players in the CarbonChat system. This interface provides methods for managing player chat settings, permissions, and status. ### Methods #### `applyOptionalChatFilters()` * **Description**: Checks if optional chat filters apply to messages sent to this player. * **Returns**: `boolean` - True if optional chat filters are applied, false otherwise. #### `applyOptionalChatFilters(boolean applyOptionalChatFilters)` * **Description**: Sets whether optional chat filters should apply to messages sent to this player. * **Parameters**: * `applyOptionalChatFilters` (boolean) - Required - True to apply filters, false to disable. #### `awareOf(CarbonPlayer other)` * **Description**: Determines if this player can see the other specified player. * **Parameters**: * `other` (CarbonPlayer) - Required - The other player to check visibility against. * **Returns**: `boolean` - True if this player can see the other player, false otherwise. #### `channelForMessage(Component message)` * **Description**: Determines which channel a message should be sent to and removes any channel prefixes. * **Parameters**: * `message` (Component) - Required - The chat message component. * **Returns**: `CarbonPlayer.ChannelMessage` - An object containing the determined channel and the message content. #### `createItemHoverComponent(InventorySlot slot)` * **Description**: Creates a chat component for the item in the specified inventory slot. * **Parameters**: * `slot` (InventorySlot) - Required - The inventory slot to get the item from. * **Returns**: `@Nullable Component` - The chat component for the item, or null if the slot is empty. #### `deafened()` * **Description**: Checks if the player is deafened and unable to read messages. * **Returns**: `boolean` - True if the player is deafened, false otherwise. #### `deafened(boolean deafened)` * **Description**: Mutes or unmutes the player, preventing them from reading messages. * **Parameters**: * `deafened` (boolean) - Required - True to deafen, false to undeafen. #### `displayName()` * **Description**: Gets the player's display name. * **Returns**: `Component` - The player's display name. #### `distanceSquaredFrom(CarbonPlayer other)` * **Description**: Calculates the squared distance from the other player. Returns -1 if they are not in the same world. * **Parameters**: * `other` (CarbonPlayer) - Required - The other player to measure distance from. * **Returns**: `double` - The squared distance, or -1 if in different worlds. #### `groups()` * **Description**: Retrieves the list of all groups the player belongs to. * **Returns**: `List` - A list of group names. #### `hasNickname()` * **Description**: Checks if the player has a nickname set. * **Returns**: `boolean` - True if a nickname is set, false otherwise. #### `hasPermission(String permission)` * **Description**: Checks if the player has the specified permission. * **Parameters**: * `permission` (String) - Required - The permission string to check. * **Returns**: `boolean` - True if the player has the permission, false otherwise. #### `ignoring()` * **Description**: Gets the UUIDs of players this player is currently ignoring. * **Returns**: `Set` - A set of player UUIDs. #### `ignoring(UUID player)` * **Description**: Checks if this player is ignoring the specified player by UUID. * **Parameters**: * `player` (UUID) - Required - The UUID of the player to check. * **Returns**: `boolean` - True if the player is being ignored, false otherwise. #### `ignoring(UUID player, boolean nowIgnoring)` * **Description**: Adds or removes a player from the ignore list by UUID. * **Parameters**: * `player` (UUID) - Required - The UUID of the player to manage. * `nowIgnoring` (boolean) - Required - True to add to ignore list, false to remove. #### `ignoring(CarbonPlayer player)` * **Description**: Checks if this player is ignoring the specified CarbonPlayer. * **Parameters**: * `player` (CarbonPlayer) - Required - The CarbonPlayer to check. * **Returns**: `boolean` - True if the player is being ignored, false otherwise. #### `ignoring(CarbonPlayer player, boolean nowIgnoring)` * **Description**: Adds or removes a CarbonPlayer from the ignore list. * **Parameters**: * `player` (CarbonPlayer) - Required - The CarbonPlayer to manage. * `nowIgnoring` (boolean) - Required - True to add to ignore list, false to remove. #### `ignoringDirectMessages()` * **Description**: Checks if the player is configured to ignore direct messages. * **Returns**: `boolean` - True if direct messages are ignored, false otherwise. #### `ignoringDirectMessages(boolean ignoring)` * **Description**: Sets whether the player should receive or ignore direct messages. * **Parameters**: * `ignoring` (boolean) - Required - True to ignore direct messages, false to receive them. #### `joinChannel(ChatChannel channel)` * **Description**: Joins the specified chat channel for the player if they have left it. * **Parameters**: * `channel` (ChatChannel) - Required - The chat channel to join. #### `lastWhisperTarget()` * **Description**: Gets the UUID of the last player this player whispered to. * **Returns**: `@Nullable UUID` - The UUID of the last whisper target, or null if none. #### `lastWhisperTarget(@Nullable UUID uuid)` * **Description**: Sets the UUID of the last player this player whispered to. * **Parameters**: * `uuid` (@Nullable UUID) - Optional - The UUID of the last whisper target. #### `leaveChannel(ChatChannel channel)` * **Description**: Leaves the specified chat channel for the player. * **Parameters**: * `channel` (ChatChannel) - Required - The chat channel to leave. #### `leftChannels()` * **Description**: Retrieves a list of all channels the player has left using the leave command. * **Returns**: `List` - A list of channel keys. #### `locale()` * **Description**: Gets the player's locale settings. * **Returns**: `@Nullable Locale` - The player's locale, or null if not set. #### `muted()` * **Description**: Checks if the player is currently muted. * **Returns**: `boolean` - True if muted, false otherwise. #### `muted(boolean muted)` * **Description**: Mutes or unmutes the player. * **Parameters**: * `muted` (boolean) - Required - True to mute, false to unmute. #### `muteExpiration()` * **Description**: Gets the epoch time (in milliseconds) when the player's mute will expire. * **Returns**: `long` - The mute expiration time in epoch milliseconds. #### `muteExpiration(long epochMillis)` * **Description**: Sets the epoch time (in milliseconds) for when the player's mute will expire. * **Parameters**: * `epochMillis` (long) - Required - The epoch time in milliseconds. #### `nickname()` * **Description**: Gets the player's nickname, which is displayed in chat and the tab menu. * **Returns**: `@Nullable Component` - The player's nickname component, or null if not set. #### `nickname(@Nullable Component nickname)` * **Description**: Sets the player's nickname. * **Parameters**: * `nickname` (@Nullable Component) - Optional - The nickname component to set. #### `online()` * **Description**: Checks if the player is currently online. * **Returns**: `boolean` - True if the player is online, false otherwise. #### `party()` * **Description**: Retrieves the player's current party. * **Returns**: `CompletableFuture<@Nullable Party>` - A CompletableFuture that resolves to the player's Party object, or null if they are not in a party. #### `primaryGroup()` * **Description**: Gets the player's primary group name. * **Returns**: `String` - The name of the player's primary group. #### `sameWorldAs(CarbonPlayer other)` * **Description**: Checks if this player and the other player are in the same world or server. * **Parameters**: * `other` (CarbonPlayer) - Required - The other player to compare worlds with. * **Returns**: `boolean` - True if they are in the same world, false otherwise. #### `selectedChannel()` * **Description**: Gets the player's currently selected chat channel. * **Returns**: `@Nullable ChatChannel` - The selected chat channel, or null if none is set. #### `selectedChannel(@Nullable ChatChannel chatChannel)` * **Description**: Sets the player's selected chat channel. * **Parameters**: * `chatChannel` (@Nullable ChatChannel) - Optional - The chat channel to set as selected. #### `sendMessageAsPlayer(String message)` * **Description**: Sends a message to the player, appearing as if it originated from the player themselves. * **Parameters**: * `message` (String) - Required - The message content to send. #### `spying()` * **Description**: Checks if the player is currently spying on messages (able to read muted/private messages). * **Returns**: `boolean` - True if spying is enabled, false otherwise. #### `spying(boolean spying)` * **Description**: Enables or disables the player's ability to spy on messages. * **Parameters**: * `spying` (boolean) - Required - True to enable spying, false to disable. #### `username()` * **Description**: Gets the player's username. * **Returns**: `String` - The player's username. #### `uuid()` * **Description**: Gets the player's unique identifier (UUID). * **Returns**: `UUID` - The player's UUID. #### `vanished()` * **Description**: Checks if the player is vanished in another supported plugin. * **Returns**: `boolean` - True if vanished, false otherwise. #### `whisperReplyTarget()` * **Description**: Gets the UUID of the player to whom a whisper reply should be directed. * **Returns**: `@Nullable UUID` - The UUID of the whisper reply target, or null if none. ``` -------------------------------- ### Channel Management Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer APIs for managing player's channel subscriptions. ```APIDOC ## GET /player/{uuid}/leftChannels ### Description Gets a list of all the channels the player has left using the leave command. ### Method GET ### Endpoint /player/{uuid}/leftChannels ### Parameters #### Path Parameters - **uuid** (UUID) - Required - The unique identifier of the player. ### Response #### Success Response (200) - **leftChannels** (List) - An immutable list of channels the player has left. #### Response Example ```json { "leftChannels": [ "channel_key_1", "channel_key_2" ] } ``` ## POST /player/{uuid}/joinChannel ### Description Joins a channel for this player if they have left it. ### Method POST ### Endpoint /player/{uuid}/joinChannel ### Parameters #### Path Parameters - **uuid** (UUID) - Required - The unique identifier of the player. #### Request Body - **channel** (ChatChannel) - Required - The channel to join. ### Response #### Success Response (200) - (void) - No content is returned upon successful joining. ### Request Example ```json { "channel": { "key": "general" } } ``` ## POST /player/{uuid}/leaveChannel ### Description Leaves a channel for this player. ### Method POST ### Endpoint /player/{uuid}/leaveChannel ### Parameters #### Path Parameters - **uuid** (UUID) - Required - The unique identifier of the player. #### Request Body - **channel** (ChatChannel) - Required - The channel to leave. ### Response #### Success Response (200) - (void) - No content is returned upon successful leaving. ### Request Example ```json { "channel": { "key": "general" } } ``` ``` -------------------------------- ### CarbonServer Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/package-summary Represents the server on which Carbon is running. ```APIDOC ## CarbonServer Class ### Description The server that carbon is running on. ### Method N/A (Class definition) ### Endpoint N/A (Class definition) ### Parameters N/A (Class definition) ### Request Example N/A (Class definition) ### Response N/A (Class definition) ### Response Example N/A (Class definition) ``` -------------------------------- ### Get Default Channel Key Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChannelRegistry Retrieves the key associated with the default chat channel. This method returns a non-null Key object. ```java @NonNull Key defaultKey() ``` -------------------------------- ### Get Default Chat Channel Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChannelRegistry Retrieves the default chat channel. This method returns a non-null ChatChannel object representing the default channel. ```java @NonNull ChatChannel defaultChannel() ``` -------------------------------- ### Permission and Group Management Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer APIs for checking player permissions and retrieving group information. ```APIDOC ## GET /api/players/{player}/hasPermission/{permission} ### Description Checks if the player has the specified permission. ### Method GET ### Endpoint `/api/players/{player}/hasPermission/{permission}` ### Parameters #### Path Parameters - **player** (CarbonPlayer) - Required - The player to check permissions for. - **permission** (String) - Required - The permission node to check. ### Response #### Success Response (200) - **hasPermission** (boolean) - True if the player has the permission, false otherwise. #### Response Example ```json { "hasPermission": true } ``` ## GET /api/players/{player}/primaryGroup ### Description Returns the player's primary group. ### Method GET ### Endpoint `/api/players/{player}/primaryGroup` ### Parameters #### Path Parameters - **player** (CarbonPlayer) - Required - The player whose primary group to retrieve. ### Response #### Success Response (200) - **primaryGroup** (String) - The name of the player's primary group. #### Response Example ```json { "primaryGroup": "admin" } ``` ## GET /api/players/{player}/groups ### Description Returns a list of all groups the player belongs to. ### Method GET ### Endpoint `/api/players/{player}/groups` ### Parameters #### Path Parameters - **player** (CarbonPlayer) - Required - The player whose groups to retrieve. ### Response #### Success Response (200) - **groups** (Array) - A list of group names the player is in. #### Response Example ```json { "groups": ["admin", "moderator"] } ``` ``` -------------------------------- ### Carbon Server API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/CarbonChat Access information about the Carbon server instance. ```APIDOC ## Carbon Server API ### Description Retrieves the `CarbonServer` instance, representing the server Carbon is running on. ### Method `GET` (conceptual, accessed via interface method) ### Endpoint Accessed via `CarbonChat.server()` ### Parameters N/A (Accessed via interface method) ### Request Example ```java CarbonServer server = carbonChat.server(); ``` ### Response #### Success Response - **CarbonServer** (interface) - The Carbon server instance. #### Response Example ```java CarbonServer server = carbonChat.server(); // Use server methods to get server details ``` ### Details - **Since**: 2.0.0 ``` -------------------------------- ### Get CarbonChat Implementation (Java) Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/CarbonChatProvider This method retrieves the currently registered CarbonChat implementation. It returns the CarbonChat object and has been available since version 1.0.0. ```java /** * Gets the currently registered CarbonChat implementation. * * @return the registered carbon implementation * @since 1.0.0 */ public static CarbonChat carbonChat() ``` -------------------------------- ### Party Management API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/UserManager APIs for creating, retrieving, and managing parties. ```APIDOC ## POST /parties ### Description Creates a new party with the specified name. Parties with no users will not be saved. Use `Party.disband()` to discard. The returned reference will expire after one minute. ### Method POST ### Endpoint /parties ### Parameters #### Request Body - **name** (Component) - Required - The name for the new party. ### Response #### Success Response (200) - **Party** - The newly created party object. #### Response Example ```json { "partyId": "some-party-id", "partyName": "New Party" } ``` ``` ```APIDOC ## GET /parties/{id} ### Description Looks up an existing party by its ID. Parties that have never had a user are not saved and thus not retrievable. The returned reference will expire after one minute. ### Method GET ### Endpoint /parties/{id} ### Parameters #### Path Parameters - **id** (UUID) - Required - The unique identifier of the party. ### Response #### Success Response (200) - **Party** (CompletableFuture<@Nullable Party>) - The existing party object or a future that resolves to it. #### Response Example ```json { "partyId": "some-party-id", "partyName": "Existing Party" } ``` ``` -------------------------------- ### Get Server Console Audience Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/CarbonServer Retrieves the Audience representing the server's console. This method is part of the CarbonServer interface and has been available since version 2.0.0. ```java Audience console() The server's console. Returns: the server's console Since: 2.0.0 ``` -------------------------------- ### Party Join Event Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/event/events/PartyJoinEvent Provides details about a player joining a party. ```APIDOC ## PartyJoinEvent ### Description Represents an event that is called when a player is added to a `Party`. ### Method This is an interface, not a direct HTTP method. ### Endpoint N/A (This is an event interface within a Java library) ### Parameters This event provides access to the following information: #### Instance Methods - **`party()`** (`Party`) - Returns the party being joined. `Party.members()` will reflect the new member. - **`playerId()`** (`UUID`) - Returns the ID of the player joining the party. The player's `CarbonPlayer.party()` field is not guaranteed to be updated immediately, especially if the change needs to propagate cross-server. ### Request Example N/A ### Response #### Success Response (Event Triggered) - **`party`** (`Party`) - The party object that the player joined. - **`playerId`** (`UUID`) - The unique identifier of the player who joined the party. #### Response Example N/A (Event data is passed to listeners) ``` -------------------------------- ### Get Online Players List Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/CarbonServer Retrieves a list of CarbonPlayer objects representing all players currently online on the server. This method is part of the CarbonServer interface and has been available since version 2.0.0. ```java List players() The players that are online on the server. Returns: the online players Since: 2.0.0 ``` -------------------------------- ### Player Interaction Components Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/index-all APIs for creating UI components related to player data, such as item hover components. ```APIDOC ## POST /api/players/{playerId}/inventory/{slot}/hover-component ### Description Creates a chat component for the item in the specified inventory slot. ### Method POST ### Endpoint /api/players/{playerId}/inventory/{slot}/hover-component ### Parameters #### Path Parameters - **playerId** (string) - Required - The unique identifier of the player. - **slot** (InventorySlot) - Required - The inventory slot to get the item from. #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **component** (Component) - The chat component for the item, or null if the slot is empty. #### Response Example ```json { "component": "item_hover_component" } ``` ``` -------------------------------- ### Getting Renderers for Chat Components (Java) Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/event/events/CarbonChatEvent This snippet shows how to retrieve the list of renderers used to construct chat components for each recipient. The `renderers()` method returns a mutable list of KeyedRenderer objects. This functionality is available since version 2.0.0. ```java import net.draycia.carbon.api.event.CarbonChatEvent; import net.draycia.carbon.api.render.KeyedRenderer; import java.util.List; public class RendererLister { public void listRenderers(CarbonChatEvent event) { List renderers = event.renderers(); System.out.println("Number of renderers: " + renderers.size()); for (KeyedRenderer renderer : renderers) { System.out.println("Renderer: " + renderer.getKey()); } // The list is mutable, so you could add or remove renderers if needed // renderers.add(new MyCustomRenderer()); } } ``` -------------------------------- ### ChannelSwitchEvent Interface Definition (Java) Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/event/events/ChannelSwitchEvent Defines the ChannelSwitchEvent interface, which extends CarbonEvent. This event is triggered when a player switches channels. It includes methods to get the current player and the target chat channel, as well as a method to set the new channel. ```java package de.hexaoxi.carbonchat.event; import de.hexaoxi.carbonchat.CarbonPlayer; import de.hexaoxi.carbonchat.chat.ChatChannel; import org.checkerframework.checker.nullness.qual.NonNull; @org.checkerframework.framework.qual.DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class) public interface ChannelSwitchEvent extends CarbonEvent { /** * The channel the player is switching to. * * @return the target chat channel * @since 3.0.0 */ ChatChannel channel(); /** * Sets the player's new channel. * * @param chatChannel the new channel * @since 3.0.0 */ void channel(ChatChannel chatChannel); /** * The player switching channels. * * @return the player switching channels * @since 3.0.0 */ CarbonPlayer player(); } ``` -------------------------------- ### Player UUID and Locale Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer Retrieve unique player identifiers and their locale settings. ```APIDOC ## GET /api/players/{player}/uuid ### Description Retrieves the player's unique identifier (UUID). ### Method GET ### Endpoint `/api/players/{player}/uuid` ### Parameters #### Path Parameters - **player** (CarbonPlayer) - Required - The player whose UUID to retrieve. ### Response #### Success Response (200) - **uuid** (UUID) - The player's UUID. #### Response Example ```json { "uuid": "00000000-0000-0000-0000-000000000000" } ``` ## GET /api/players/{player}/locale ### Description Gets the player's locale. Returns null if the player is offline. ### Method GET ### Endpoint `/api/players/{player}/locale` ### Parameters #### Path Parameters - **player** (CarbonPlayer) - Required - The player whose locale to retrieve. ### Response #### Success Response (200) - **locale** (Locale | null) - The player's locale, or null if offline. #### Response Example ```json { "locale": "en_US" } ``` ``` -------------------------------- ### PartyLeaveEvent Interface Definition (Java) Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/event/events/PartyLeaveEvent Defines the PartyLeaveEvent interface, which is triggered when a player is removed from a party. It extends the CarbonEvent interface and provides methods to get the associated party and the player's ID. Note that the player's party field may not be immediately updated. ```java package de.hexaoxi.carbonchat.api.events.party; import de.hexaoxi.carbonchat.api.party.Party; import de.hexaoxi.carbonchat.api.player.CarbonPlayer; import de.hexaoxi.carbonchat.api.events.CarbonEvent; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.framework.qual.DefaultQualifier; import java.util.UUID; @DefaultQualifier(NonNull.class) public interface PartyLeaveEvent extends CarbonEvent { /** * ID of the player leaving a party. * The player's {@link CarbonPlayer#party()} field is not guaranteed to be updated immediately, especially if the change needs to propagate cross-server. * * @return player id * @since 3.0.0 */ UUID playerId(); /** * The party being left. * {@link Party#members()} will reflect the removed member. * * @return party * @since 3.0.0 */ Party party(); } ``` -------------------------------- ### Console Access Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/index-all Provides access to the server's console for administrative tasks or logging. ```APIDOC ## GET /api/server/console ### Description Retrieves access to the server's console interface. ### Method GET ### Endpoint /api/server/console ### Parameters None ### Request Example None ### Response #### Success Response (200) - **console** (object) - An object representing the server console. #### Response Example ```json { "console": "server_console_object" } ``` ``` -------------------------------- ### ChatComponentRenderer API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/util/ChatComponentRenderer Documentation for the ChatComponentRenderer interface, used to construct chat components on a per-player basis. ```APIDOC ## Interface: ChatComponentRenderer ### Description Renderer used to construct chat components on a per-player basis. ### Since 2.0.0 ### Methods #### render ```java Component render(CarbonPlayer sender, Audience recipient, Component message, Component originalMessage) ``` ##### Description Renders a Component for the specified recipient. ##### Parameters * **sender** (CarbonPlayer) - The player that sent the message. * **recipient** (Audience) - A recipient of the message. May be a player, console, or other Audience implementations. * **message** (Component) - The message being sent. * **originalMessage** (Component) - The original message that was sent. ##### Returns (Component) - The component to be shown to the recipient, or empty if the recipient should not receive the message. ##### Since 2.0.0 ``` -------------------------------- ### Item Hover Component Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer Generates a chat component for an item in a specific inventory slot. ```APIDOC ## GET /api/players/{player}/inventorySlot/{slot}/itemHoverComponent ### Description Creates a chat component that can be used for hovering over an item in a specified inventory slot. Returns null if the slot is empty. ### Method GET ### Endpoint `/api/players/{player}/inventorySlot/{slot}/itemHoverComponent` ### Parameters #### Path Parameters - **player** (CarbonPlayer) - Required - The player whose inventory to access. - **slot** (InventorySlot) - Required - The inventory slot containing the item. ### Response #### Success Response (200) - **itemHoverComponent** (Component | null) - The chat component for the item, or null if the slot is empty. #### Response Example ```json { "itemHoverComponent": {"text":"Diamond Sword"} } ``` ``` -------------------------------- ### Chat Component Renderer Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/util/package-summary Provides functionality for rendering chat components on a per-player basis. ```APIDOC ## ChatComponentRenderer ### Description Renderer used to construct chat components on a per-player basis. ### Method N/A (Class Description) ### Endpoint N/A (Class Description) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Player Settings API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/index-all Endpoints for managing player-specific chat settings. ```APIDOC ## PUT /api/players/{playerId}/chat-filters ### Description Configure whether optional chat filters apply to messages sent to a player. ### Method PUT ### Endpoint /api/players/{playerId}/chat-filters ### Parameters #### Path Parameters - **playerId** (UUID) - Required - The unique identifier of the player. #### Request Body - **applyFilters** (boolean) - Required - Set to true to apply optional chat filters, false otherwise. ### Request Example ```json { "applyFilters": true } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the setting was updated. #### Response Example ```json { "message": "Optional chat filters setting updated successfully." } ``` ``` -------------------------------- ### Channel Command Aliases API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChatChannel Retrieves a list of alternative command names for a specific channel. ```APIDOC ## GET /channels/{channelId}/commandAliases ### Description Alternative command names for this channel. ### Method GET ### Endpoint /channels/{channelId}/commandAliases ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier for the chat channel. ### Response #### Success Response (200) - **commandAliases** (array) - A list of strings representing alternative command names. #### Response Example ```json { "commandAliases": ["g", "all"] } ``` ``` -------------------------------- ### ChannelPermissions Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/allclasses-index Handles permission management for chat channels. ```APIDOC ## Class ChannelPermissions ### Description Permissions handling for a channel. ### Method N/A (Class) ### Endpoint N/A (Class) ### Parameters N/A (Class) ### Request Example N/A (Class) ### Response N/A (Class) ``` -------------------------------- ### CarbonChatProvider Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/package-summary Provides static access to the `CarbonChat` instance. ```APIDOC ## CarbonChatProvider Class ### Description Static accessor for the `CarbonChat` instance. ### Method N/A (Class definition) ### Endpoint N/A (Class definition) ### Parameters N/A (Class definition) ### Request Example N/A (Class definition) ### Response N/A (Class definition) ### Response Example N/A (Class definition) ``` -------------------------------- ### Channel Permissions Results Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/index-all APIs for defining permission results for channel actions. ```APIDOC ## POST /api/channels/permissions/denied/supplier ### Description Returns a result denoting that the action is denied for the player, using a supplier. ### Method POST ### Endpoint /api/channels/permissions/denied/supplier ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **supplier** (Supplier) - Required - A supplier that provides the denial reason. ### Request Example ```json { "supplier": "supplier_object" } ``` ### Response #### Success Response (200) - **permissionResult** (ChannelPermissionResult) - The permission result object. #### Response Example ```json { "permissionResult": "denied_result_supplier" } ``` ``` ```APIDOC ## POST /api/channels/permissions/denied/component ### Description Returns a result denoting that the action is denied for the player, using a component. ### Method POST ### Endpoint /api/channels/permissions/denied/component ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **component** (Component) - Required - The component detailing the denial reason. ### Request Example ```json { "component": "denial_reason_component" } ``` ### Response #### Success Response (200) - **permissionResult** (ChannelPermissionResult) - The permission result object. #### Response Example ```json { "permissionResult": "denied_result_component" } ``` ``` -------------------------------- ### Channel Command Registration API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/ChatChannel Checks if commands should be registered for a specific channel. ```APIDOC ## GET /channels/{channelId}/shouldRegisterCommands ### Description If commands should be registered for this channel. ### Method GET ### Endpoint /channels/{channelId}/shouldRegisterCommands ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier for the chat channel. ### Response #### Success Response (200) - **shouldRegisterCommands** (boolean) - True if commands should be registered for this channel, false otherwise. #### Response Example ```json { "shouldRegisterCommands": true } ``` ``` -------------------------------- ### ChannelRegistry Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/allclasses-index Manages the registration and retrieval of chat channels. ```APIDOC ## Class ChannelRegistry ### Description Registry for `chat channels`. ### Method N/A (Class) ### Endpoint N/A (Class) ### Parameters N/A (Class) ### Request Example N/A (Class) ### Response N/A (Class) ``` -------------------------------- ### Send Message As Player Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/users/CarbonPlayer API to send a message from the perspective of a player. ```APIDOC ## POST /player/{uuid}/sendMessage ### Description Sends the message as the player. ### Method POST ### Endpoint /player/{uuid}/sendMessage ### Parameters #### Path Parameters - **uuid** (UUID) - Required - The unique identifier of the player. #### Request Body - **message** (String) - Required - The message to be sent. ### Response #### Success Response (200) - (void) - No content is returned upon successful sending of the message. ### Request Example ```json { "message": "Hello there!" } ``` ``` -------------------------------- ### UserManager Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/allclasses-index Manages the loading, obtaining, and saving of CarbonPlayers. ```APIDOC ## Class UserManager ### Description Manager used to load/obtain and save `CarbonPlayers`. ### Method N/A (Class) ### Endpoint N/A (Class) ### Parameters N/A (Class) ### Request Example N/A (Class) ### Response N/A (Class) ``` -------------------------------- ### CarbonChat Interface Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/package-summary The `CarbonChat` interface serves as the primary entry point for utilizing most of the CarbonChat API functionalities. ```APIDOC ## CarbonChat Interface ### Description The `CarbonChat` interface is the gateway to interacting with the majority of the CarbonChat API. ### Method N/A (Interface definition) ### Endpoint N/A (Interface definition) ### Parameters N/A (Interface definition) ### Request Example N/A (Interface definition) ### Response N/A (Interface definition) ### Response Example N/A (Interface definition) ``` -------------------------------- ### CarbonServer Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/allclasses-index Represents the server environment on which CarbonChat is running. ```APIDOC ## Class CarbonServer ### Description The server that carbon is running on. ### Method N/A (Class) ### Endpoint N/A (Class) ### Parameters N/A (Class) ### Request Example N/A (Class) ### Response N/A (Class) ``` -------------------------------- ### CarbonChat API Gateway Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/CarbonChat The `CarbonChat` interface serves as the main entry point for interacting with the CarbonChat API. Obtain an instance via `CarbonChatProvider.carbonChat()`. ```APIDOC ## CarbonChat Interface ### Description The `CarbonChat` interface is the gateway to interacting with the majority of the CarbonChat API. Instances may be obtained through `CarbonChatProvider.carbonChat()` once Carbon is loaded. ### Method This interface does not have a direct HTTP method or endpoint as it's an interface for programmatic access. ### Parameters N/A (This is an interface) ### Request Example ```java CarbonChat chatApi = CarbonChatProvider.carbonChat(); ``` ### Response #### Success Response - **CarbonChat** (interface) - An instance of the CarbonChat interface. #### Response Example ```java // Returns an instance of the CarbonChat interface CarbonChat chatApi = CarbonChatProvider.carbonChat(); ``` ``` -------------------------------- ### Keyed Renderer Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/util/package-summary A chat renderer that can be identified by a key. ```APIDOC ## KeyedRenderer ### Description A `chat renderer` that's identifiable by key. ### Method N/A (Class Description) ### Endpoint N/A (Class Description) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Channel Management API Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/net/draycia/carbon/api/channels/package-summary APIs for interacting with chat channels, including creating, retrieving, and managing permissions. ```APIDOC ## ChannelRegistry API ### Description Provides access to the registry of chat channels. ### Method GET ### Endpoint /channels ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example (No request body for GET) ### Response #### Success Response (200) - **channels** (List) - A list of available chat channels. #### Response Example { "channels": [ { "id": "channel-1", "formatter": "default", "filters": [] }, { "id": "channel-2", "formatter": "styled", "filters": ["admin"] } ] } ## ChatChannel API ### Description Represents an individual chat channel with its associated formatter and filters. ### Method GET ### Endpoint /channels/{channelId} ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier of the chat channel. #### Query Parameters None #### Request Body None ### Request Example (No request body for GET) ### Response #### Success Response (200) - **id** (string) - The unique identifier of the chat channel. - **formatter** (string) - The formatter used for messages in this channel. - **filters** (List) - A list of filters applied to recipients in this channel. #### Response Example { "id": "channel-1", "formatter": "default", "filters": [] } ## ChannelPermissions API ### Description Manages permissions for a specific chat channel. ### Method GET ### Endpoint /channels/{channelId}/permissions ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier of the chat channel. #### Query Parameters None #### Request Body None ### Request Example (No request body for GET) ### Response #### Success Response (200) - **permissions** (ChannelPermissions) - An object containing the permissions for the channel. #### Response Example { "permissions": { "canJoin": true, "canSendMessages": true, "canInvite": false } } ## ChannelPermissionResult API ### Description Represents the result of a channel permission check. ### Method GET ### Endpoint /channels/{channelId}/permissions/check ### Parameters #### Path Parameters - **channelId** (string) - Required - The unique identifier of the chat channel. #### Query Parameters - **userId** (string) - Required - The unique identifier of the user to check permissions for. - **permissionType** (string) - Required - The type of permission to check (e.g., 'JOIN', 'SEND_MESSAGE'). #### Request Body None ### Request Example (No request body for GET) ### Response #### Success Response (200) - **allowed** (boolean) - Whether the user is allowed the specified permission. #### Response Example { "allowed": true } ``` -------------------------------- ### InventorySlot Class Source: https://javadoc.io/doc/de.hexaoxi/carbonchat-api/3.0.0-beta.36/allclasses-index Represents a single slot within a player's inventory. ```APIDOC ## Class InventorySlot ### Description A slot in a player's inventory. ### Method N/A (Class) ### Endpoint N/A (Class) ### Parameters N/A (Class) ### Request Example N/A (Class) ### Response N/A (Class) ```