### ProxyServer.getConfiguration() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Gets the ProxyConfig instance. ```APIDOC ## getConfiguration() ### Description Gets the ProxyConfig instance. ### Signature `ProxyConfig getConfiguration()` ``` -------------------------------- ### ProxyConfig.getCommandRatelimit() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Get the rate limit for how fast a player can execute commands. ```APIDOC ## getCommandRatelimit() ### Description Get the rate limit for how fast a player can execute commands. ### Signature `int getCommandRatelimit()` ``` -------------------------------- ### getPing() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Gets the player's estimated ping in milliseconds. ```APIDOC ### long getPing() Gets the player's estimated ping in milliseconds. **Returns:** the player's ping or -1 if ping information is currently unknown ``` -------------------------------- ### Player.getClientBrand() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Gets the player's client brand. ```APIDOC ## getClientBrand() ### Description Gets the player's client brand. ### Signature `String getClientBrand()` ``` -------------------------------- ### ProxyServer.getCommandManager() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Gets the CommandManager instance. ```APIDOC ## getCommandManager() ### Description Gets the CommandManager instance. ### Signature `CommandManager getCommandManager()` ``` -------------------------------- ### ServerPing.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerPing.Builder.html Methods for configuring and building a ServerPing instance. ```APIDOC ## ServerPing.Builder Methods ### version(ServerPing.Version version) Sets the version information for the ping response. ### onlinePlayers(int onlinePlayers) Sets the number of online players. ### maximumPlayers(int maximumPlayers) Sets the maximum player count (does not affect actual server join limits). ### samplePlayers(ServerPing.SamplePlayer... players) / samplePlayers(Collection players) Adds sample players to the response. ### modType(String modType) Sets the mod type string. ### mods(ModInfo.Mod... mods) / mods(ModInfo mods) Sets the mod information. ### clearMods() Clears the current list of mods. ### clearSamplePlayers() Clears the current list of sample players. ### notModCompatible() Marks the server as mod incompatible. ### nullPlayers() Sets the player count display to '???'. ### description(Component description) Sets the server description component. ### favicon(Favicon favicon) Sets the server favicon. ### clearFavicon() Clears the current favicon. ### build() Constructs and returns a new ServerPing instance. ``` -------------------------------- ### offerSuggestions Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandManager.html Asynchronously collects raw completion suggestions for a given command line. ```APIDOC ### offerSuggestions(CommandSource source, String cmdLine) Asynchronously collects suggestions to fill in the given command `cmdLine`. Returns only the raw completion suggestions without tooltips. #### Parameters - **source** (CommandSource) - The source to execute the command for. - **cmdLine** (String) - The partially completed command. #### Returns - **CompletableFuture>** - A future eventually completed with a list of suggestions. ``` -------------------------------- ### getSample() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerPing.Players.html Retrieves a sample list of players currently on the server. ```APIDOC ### Method `public List getSample()` Returns a list containing a sample of players currently on the server. ``` -------------------------------- ### getPermissionChecker() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/permission/PermissionSubject.html Gets the permission checker for the subject. ```APIDOC ### PermissionChecker getPermissionChecker() Gets the permission checker for the subject. #### Returns - **PermissionChecker** - The subject's permission checker. ``` -------------------------------- ### getGameProfileProperties() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Gets the player's profile properties. ```APIDOC ### List getGameProfileProperties() Gets the player's profile properties. The returned list may be unmodifiable. **Returns:** the player's profile properties ``` -------------------------------- ### ServerPing.Players(int online, int max, List sample) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerPing.Players.html Creates a new instance of Players with the specified online count, maximum capacity, and player sample list. ```APIDOC ### Constructor `public Players(int online, int max, List sample)` Creates a new instance of the player information object. #### Parameters - **online** (int) - The number of online players. - **max** (int) - The maximum number of players allowed. - **sample** (List) - A sample of players currently on the server. ``` -------------------------------- ### build() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandMeta.Builder.html Returns a newly-created CommandMeta based on the specified parameters. ```APIDOC ### Method `CommandMeta build()` ### Description Returns a newly-created CommandMeta based on the specified parameters. ### Returns - `CommandMeta` - The built CommandMeta object. ``` -------------------------------- ### ServerInfo(String name, InetSocketAddress address) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerInfo.html Creates a new instance of ServerInfo with the specified name and network address. ```APIDOC ### Constructor: ServerInfo(String name, InetSocketAddress address) Creates a new ServerInfo object. #### Parameters - **name** (String) - The name for the server. - **address** (InetSocketAddress) - The address of the server to connect to. ``` -------------------------------- ### getPlayerSettings() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Returns the player's client settings. ```APIDOC ### PlayerSettings getPlayerSettings() Returns the player's client settings. **Returns:** the settings ``` -------------------------------- ### CommandExecuteEvent Result Accessors Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/command/class-use/CommandExecuteEvent.CommandResult.html Methods within CommandExecuteEvent to get or set the command execution result. ```APIDOC ### CommandExecuteEvent.getResult() Returns the current CommandExecuteEvent.CommandResult associated with the event. ### CommandExecuteEvent.setResult(CommandExecuteEvent.CommandResult result) Sets the CommandExecuteEvent.CommandResult for the event. ``` -------------------------------- ### create(RegisteredServer server) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/KickedFromServerEvent.RedirectPlayer.html Creates a new redirect result to forward the player to the specified server. ```APIDOC ## static KickedFromServerEvent.ServerKickResult create(RegisteredServer server) ### Description Creates a new redirect result to forward the player to the specified server. The kick reason will be displayed to the player. ### Parameters - **server** (RegisteredServer) - Required - The server to send the player to. ``` -------------------------------- ### PlayerChooseInitialServerEvent Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/PlayerChooseInitialServerEvent.html Represents the event fired when choosing the initial server for a player. ```APIDOC ## PlayerChooseInitialServerEvent ### Description Fired when a player has finished the login process, and Velocity needs to choose the first server to connect to. The event is awaited before initiating the connection. ### Methods #### getPlayer() Returns the `Player` that was connected. #### getInitialServer() Returns an `Optional` representing the currently selected initial server. #### setInitialServer(RegisteredServer server) Sets the new initial server for the player. - **server** (RegisteredServer) - The initial server the player should connect to, may be null. ``` -------------------------------- ### offerBrigadierSuggestions Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandManager.html Asynchronously collects Brigadier suggestions including tooltips for a given command line. ```APIDOC ### offerBrigadierSuggestions(CommandSource source, String cmdLine) Asynchronously collects suggestions to fill in the given command `cmdLine`. Returns the brigadier `Suggestions` with tooltips for each result. #### Parameters - **source** (CommandSource) - The source to execute the command for. - **cmdLine** (String) - The partially completed command. #### Returns - **CompletableFuture** - A future eventually completed with Brigadier `Suggestions`. ``` -------------------------------- ### create(RegisteredServer server, Component message) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/KickedFromServerEvent.RedirectPlayer.html Creates a new redirect result to forward the player to the specified server, optionally sending a message to the player. ```APIDOC ## static KickedFromServerEvent.RedirectPlayer create(@NonNull RegisteredServer server, Component message) ### Description Creates a new redirect result to forward the player to the specified server. The specified message will be sent to the player after the redirection. Use Component.empty() to skip sending any messages to the player. ### Parameters - **server** (RegisteredServer) - Required - The server to send the player to. - **message** (Component) - Required - The message to be sent to the player after redirecting. ``` -------------------------------- ### CommandManager.offerSuggestions Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/class-use/CommandSource.html Asynchronously collects command suggestions for a given command line. ```APIDOC ## CompletableFuture> CommandManager.offerSuggestions(CommandSource source, String cmdLine) ### Description Asynchronously collects suggestions to fill in the given command `cmdLine` for the specified `CommandSource`. ### Parameters - **source** (CommandSource) - The source requesting suggestions. - **cmdLine** (String) - The command line to provide suggestions for. ``` -------------------------------- ### QueryResponse.PluginInformation.of Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/QueryResponse.PluginInformation.html Creates a new instance of PluginInformation with the specified name and version. ```APIDOC ### static QueryResponse.PluginInformation of(String name, @Nullable String version) Creates a new PluginInformation object representing a plugin. #### Parameters - **name** (String) - The name of the plugin. - **version** (String) - The version of the plugin (nullable). ``` -------------------------------- ### SamplePlayer(String name, UUID id) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerPing.SamplePlayer.html Constructs a new SamplePlayer instance with the specified name and UUID. ```APIDOC ### Constructor `public SamplePlayer(String name, UUID id)` Creates a new player entry for the server ping sample list. ``` -------------------------------- ### PingOptions.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/PingOptions.Builder.html Methods available for configuring and building PingOptions instances. ```APIDOC ## PingOptions.Builder.version(ProtocolVersion protocolVersion) Sets the protocol version to use for the server ping. ## PingOptions.Builder.timeout(Duration timeout) Sets the maximum time to wait for the server ping using a Duration object. ## PingOptions.Builder.timeout(long time, TimeUnit timeunit) Sets the maximum time to wait for the server ping using a time value and unit. ## PingOptions.Builder.virtualHost(String virtualHost) Sets the virtual host to pass to the server during the ping. ## PingOptions.Builder.build() Constructs and returns a new PingOptions object based on the configured builder values. ``` -------------------------------- ### connect() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ConnectionRequestBuilder.html Initiates the connection to the remote server without automatic client-side error messaging. ```APIDOC ### CompletableFuture connect() Initiates the connection to the remote server and emits a result on the `CompletableFuture` after the user has logged on. No messages will be communicated to the client: the user is responsible for all error handling. **Returns:** - `CompletableFuture` - A future representing the status of this connection. ``` -------------------------------- ### CommandManager.offerBrigadierSuggestions Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Asynchronously collects suggestions to fill in the given command line using Brigadier. ```APIDOC ## offerBrigadierSuggestions(CommandSource, String) ### Description Asynchronously collects suggestions to fill in the given command `cmdLine`. ### Parameters - **CommandSource** - The source of the command. - **String** - The command line string to provide suggestions for. ``` -------------------------------- ### ProxyServer.createRawRegisteredServer(ServerInfo) Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Creates a raw RegisteredServer without tying it into the internal server map. ```APIDOC ### Method `RegisteredServer createRawRegisteredServer(ServerInfo info)` ### Description Creates a raw `RegisteredServer` without tying it into the internal server map. ``` -------------------------------- ### getInstance() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/plugin/PluginContainer.html Retrieves the instantiated plugin object if it is currently available. ```APIDOC ### Optional getInstance() Returns an Optional containing the plugin instance if it has been created and is available. ``` -------------------------------- ### Proxy Configuration and Utilities Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ProxyServer.html Access to core proxy managers, configuration, and resource pack builders. ```APIDOC ## PluginManager getPluginManager() ### Description Gets the PluginManager instance. ### Returns - **PluginManager** - The plugin manager instance. ## ResourcePackInfo.Builder createResourcePackBuilder(String url) ### Description Creates a builder to build a ResourcePackInfo instance for use with Player.sendResourcePackOffer(ResourcePackInfo). ### Parameters - **url** (String) - Required - The url where the resource pack can be found. ### Returns - **ResourcePackInfo.Builder** - A ResourcePackInfo builder. ``` -------------------------------- ### ProxyVersion(String name, String vendor, String version) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/ProxyVersion.html Creates a new instance of ProxyVersion with the specified name, vendor, and version. ```APIDOC ### Constructor: ProxyVersion(String name, String vendor, String version) #### Description Creates a new ProxyVersion instance to represent the proxy implementation. #### Parameters - **name** (String) - The name for the proxy implementation. - **vendor** (String) - The vendor for the proxy implementation. - **version** (String) - The version for the proxy implementation. ``` -------------------------------- ### getOriginalServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.html Retrieves the server the player originally intended to connect to. ```APIDOC ### RegisteredServer getOriginalServer() Returns the server that the player originally tried to connect to. ``` -------------------------------- ### getPreviousServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.html Retrieves the server the player is currently connected to, if applicable. ```APIDOC ### @Nullable RegisteredServer getPreviousServer() Returns the server that the player is currently connected to. This is null if the player was not connected to another server beforehand. ``` -------------------------------- ### fireAndForget() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ConnectionRequestBuilder.html Initiates the connection to the remote server without waiting for a result or returning a future. ```APIDOC ### void fireAndForget() Initiates the connection to the remote server without waiting for a result. Velocity will use generic error handling code to notify the user. ``` -------------------------------- ### TabListEntry.builder() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/class-use/TabListEntry.Builder.html Static method to initialize a new TabListEntry.Builder instance. ```APIDOC ## TabListEntry.builder() ### Description Returns a new instance of `TabListEntry.Builder` used to construct a `TabListEntry`. ### Signature `static TabListEntry.Builder builder()` ``` -------------------------------- ### isOnlineMode() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Returns the player's connection status. ```APIDOC ### boolean isOnlineMode() Returns the player's connection status. **Returns:** true if the player is authenticated with Mojang servers ``` -------------------------------- ### ServerPing.Builder.description(Component) Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Sets the description component for the server ping response. ```APIDOC ## ServerPing.Builder.description(Component) ### Description Uses the provided Component as the description in the server ping response. ### Parameters - **description** (Component) - Required - The description to display. ``` -------------------------------- ### Scheduler.buildTask Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/scheduler/class-use/Scheduler.TaskBuilder.html Initializes a new TaskBuilder for creating a task on the proxy. ```APIDOC ## Scheduler.buildTask(Object plugin, Runnable runnable) ## Scheduler.buildTask(Object plugin, Consumer consumer) ### Description Initializes a new Scheduler.TaskBuilder for creating a task on the proxy. ### Parameters - **plugin** (Object) - Required - The plugin instance associated with the task. - **runnable/consumer** (Runnable/Consumer) - Required - The task logic to execute. ``` -------------------------------- ### ProxyServer.registerServer(ServerInfo) Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Registers a new server with the proxy. ```APIDOC ## registerServer(ServerInfo) ### Description Registers a server with this proxy. ### Method Method in interface com.velocitypowered.api.proxy.ProxyServer ``` -------------------------------- ### Version(int protocol, String name) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerPing.Version.html Creates a new instance of Version representing a server protocol version. ```APIDOC ## Constructor: Version(int protocol, String name) ### Description Creates a new instance of the Version class to define the protocol version and its friendly name. ### Parameters - **protocol** (int) - The protocol version number. - **name** (String) - A friendly name for the protocol version. ``` -------------------------------- ### ConnectionRequestBuilder.connectWithIndication() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Initiates the connection to the remote server and emits a result on the CompletableFuture after the user has logged on. ```APIDOC ## connectWithIndication() ### Description Initiates the connection to the remote server and emits a result on the `CompletableFuture` after the user has logged on. ``` -------------------------------- ### ResourcePackInfo.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/ResourcePackInfo.Builder.html Methods available for configuring and building a ResourcePackInfo instance. ```APIDOC ## ResourcePackInfo.Builder Methods ### setId(UUID id) Sets the unique identifier for the resource pack. ### setShouldForce(boolean shouldForce) Sets whether the resource pack is required to play on the network. For clients 1.17+, this removes the decline button and disconnects players who close the prompt. For older clients, it disconnects players who decline the pack. ### setHash(@Nullable byte[] hash) Sets the SHA-1 hash of the resource pack. Providing this allows the client to check for a cached version before downloading. ### setPrompt(@Nullable Component prompt) Sets a component to display on the download prompt (supported on client versions 1.17+). ### build() Constructs and returns the ResourcePackInfo instance. ``` -------------------------------- ### getServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ConnectionRequestBuilder.html Retrieves the target server for the connection request. ```APIDOC ### RegisteredServer getServer() Returns the server that this connection request represents. **Returns:** - `RegisteredServer` - The server this request will connect to. ``` -------------------------------- ### getPlugin() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandMeta.html Retrieves the plugin instance that registered the command. ```APIDOC ### Method @Nullable Object getPlugin() ### Description Returns the plugin who registered the command. Note that some Command registrations may not provide this information. ### Returns - **@Nullable Object** - The registering plugin. ``` -------------------------------- ### ResourcePackInfo.asBuilder(String newUrl) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/class-use/ResourcePackInfo.Builder.html Creates a builder from an existing ResourcePackInfo instance with a new URL. ```APIDOC ## ResourcePackInfo.asBuilder(String newUrl) ### Description Returns a copy of this ResourcePackInfo instance as a builder, using the new URL. ### Parameters - **newUrl** (String) - The new URL for the resource pack. ``` -------------------------------- ### allowed(RegisteredServer server) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.ServerResult.html Creates a result that allows the player to connect to the specified server. ```APIDOC ### static ServerResult allowed(RegisteredServer server) Allows the player to connect to the specified server. #### Parameters - **server** (RegisteredServer) - The new server to connect to. #### Returns - **ServerResult** - A result to allow the player to connect to the specified server. ``` -------------------------------- ### ServerPing.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/ServerPing.Builder.html The Builder class allows for the configuration of various server ping attributes before finalizing the object with the build() method. ```APIDOC ## ServerPing.Builder ### build() - Returns: ServerPing - Description: Uses the information from this builder to create a new ServerPing instance. ### description(Component description) - Returns: ServerPing.Builder - Description: Sets the description Component for the response. ### favicon(Favicon favicon) - Returns: ServerPing.Builder - Description: Sets the favicon for the response. ### maximumPlayers(int maximumPlayers) - Returns: ServerPing.Builder - Description: Sets the maximum player count for the response. ### onlinePlayers(int onlinePlayers) - Returns: ServerPing.Builder - Description: Sets the online player count for the response. ### version(ServerPing.Version version) - Returns: ServerPing.Builder - Description: Sets the version information for the response. ### clearFavicon() - Returns: ServerPing.Builder - Description: Clears the current favicon. ### clearMods() - Returns: ServerPing.Builder - Description: Clears the current list of mods. ### clearSamplePlayers() - Returns: ServerPing.Builder - Description: Clears the current list of sample players. ``` -------------------------------- ### Getter Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/ProxyVersion.html Methods to retrieve the name, vendor, and version information from a ProxyVersion instance. ```APIDOC ### Method: getName() Returns the name of the proxy implementation. ### Method: getVendor() Returns the vendor of the proxy implementation. ### Method: getVersion() Returns the version string of the proxy implementation. ``` -------------------------------- ### setServerLinks(List links) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Send the player a list of custom links to display in their client's pause menu. ```APIDOC ### void setServerLinks(List links) Send the player a list of custom links to display in their client's pause menu. **Parameters:** - links (List) - the list of links ``` -------------------------------- ### Send Plugin Message to Server Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Demonstrates how to send a plugin message to the server the player is currently connected to, rather than the client. ```java final ChannelIdentifier identifier; final Player player; player.getCurrentServer() .map(ServerConnection::getServer) .ifPresent((RegisteredServer server) -> { server.sendPluginMessage(identifier, data); }); ``` -------------------------------- ### getPreviousServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ServerConnection.html Returns the server that the player associated with this connection was connected to before switching to this connection. ```APIDOC ## Optional getPreviousServer() ### Description Returns the server that the player associated with this connection was connected to before switching to this connection. ### Returns - **Optional** - The server the player was connected to. ``` -------------------------------- ### getServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/KickedFromServerEvent.RedirectPlayer.html Retrieves the target server for the redirection. ```APIDOC ## @NonNull RegisteredServer getServer() ### Description Returns the server to which the player is being redirected. ``` -------------------------------- ### ProxyInitializeEvent() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/proxy/ProxyInitializeEvent.html Constructs a new ProxyInitializeEvent instance. ```APIDOC ## Constructor: ProxyInitializeEvent() ### Description Constructs a new instance of the ProxyInitializeEvent. This event is fired by the proxy after plugins have been loaded but before the proxy starts accepting connections. ``` -------------------------------- ### PostLoginEvent(Player player) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/connection/PostLoginEvent.html Constructs a new PostLoginEvent for the specified player. ```APIDOC ## Constructor: PostLoginEvent(Player player) ### Description Constructs a new PostLoginEvent instance for the given player. ### Parameters - **player** (Player) - Required - The player associated with this login event. ``` -------------------------------- ### ConnectionRequestBuilder.connect() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Initiates the connection to the remote server and emits a result on the CompletableFuture after the user has logged on. ```APIDOC ## connect() ### Description Initiates the connection to the remote server and emits a result on the `CompletableFuture` after the user has logged on. ``` -------------------------------- ### connectWithIndication() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ConnectionRequestBuilder.html Initiates the connection to the remote server using built-in error handling for the client. ```APIDOC ### CompletableFuture connectWithIndication() Initiates the connection to the remote server and emits a result on the `CompletableFuture` after the user has logged on. Velocity's own built-in handling will be used to provide errors to the client. **Returns:** - `CompletableFuture` - A future representing the status of this connection. ``` -------------------------------- ### PlayerModInfoEvent(Player player, ModInfo modInfo) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/PlayerModInfoEvent.html Constructs a new PlayerModInfoEvent instance. ```APIDOC ### Constructor `PlayerModInfoEvent(Player player, ModInfo modInfo)` Creates a new event instance representing the mod information sent by a Forge client. ``` -------------------------------- ### buildTask(Object plugin, Runnable runnable) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/scheduler/Scheduler.html Initializes a new TaskBuilder for creating a task on the proxy using a Runnable. ```APIDOC ## buildTask(Object plugin, Runnable runnable) ### Description Initializes a new Scheduler.TaskBuilder for creating a task on the proxy. ### Parameters - **plugin** (Object) - Required - The plugin to request the task for. - **runnable** (Runnable) - Required - The task to run when scheduled. ### Returns - **Scheduler.TaskBuilder** - The task builder instance. ``` -------------------------------- ### ModInfo(String type, List modList) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/ModInfo.html Constructs a new ModInfo instance with the specified Forge server list version and list of mods. ```APIDOC ### Constructor `public ModInfo(String type, List modList)` ### Parameters - **type** (String) - The Forge server list version to use. - **modList** (List) - The mods to present to the client. ``` -------------------------------- ### getPlugins Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/plugin/PluginManager.html Returns a collection of all currently loaded plugins. ```APIDOC ### getPlugins() Retrieves a collection of all `PluginContainer`s currently loaded on the proxy. **Returns:** - `Collection` - A collection of all loaded plugins. ``` -------------------------------- ### getHints() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandMeta.html Retrieves the command nodes used for argument metadata and tab-complete suggestions. ```APIDOC ### Method Collection> getHints() ### Description Returns an immutable collection containing command nodes that provide additional argument metadata and tab-complete suggestions. Note that some Command implementations may not support hinting. ### Returns - **Collection** - The hinting command nodes. ``` -------------------------------- ### buildTask(Object plugin, Consumer consumer) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/scheduler/Scheduler.html Initializes a new TaskBuilder for creating a task on the proxy using a Consumer. ```APIDOC ## buildTask(Object plugin, Consumer consumer) ### Description Initializes a new Scheduler.TaskBuilder for creating a task on the proxy, allowing the task to cancel itself. ### Parameters - **plugin** (Object) - Required - The plugin to request the task for. - **consumer** (Consumer) - Required - The task to be run when scheduled with the capacity to cancel itself. ### Returns - **Scheduler.TaskBuilder** - The task builder instance. ``` -------------------------------- ### GameProfile Constructors Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/GameProfile.html Constructors for creating a new GameProfile instance. ```APIDOC ## Constructor: GameProfile(UUID id, String name, List properties) ### Description Creates a new Mojang game profile using a standard UUID. ### Parameters - **id** (UUID) - The UUID for the profile. - **name** (String) - The profile's username. - **properties** (List) - Properties for the profile. ## Constructor: GameProfile(String undashedId, String name, List properties) ### Description Creates a new Mojang game profile using an undashed, Mojang-style UUID string. ### Parameters - **undashedId** (String) - The undashed, Mojang-style UUID for the profile. - **name** (String) - The profile's username. - **properties** (List) - Properties for the profile. ``` -------------------------------- ### KickedFromServerEvent.RedirectPlayer.create Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/class-use/KickedFromServerEvent.RedirectPlayer.html Creates a new redirect result to forward the player to the specified server. ```APIDOC ## static KickedFromServerEvent.RedirectPlayer.create(@NonNull RegisteredServer server, Component message) ### Description Creates a new redirect result to forward the player to the specified server with an optional message. ### Parameters - **server** (RegisteredServer) - Required - The target server to redirect the player to. - **message** (Component) - Optional - The message to display to the player upon redirection. ### Returns - **KickedFromServerEvent.RedirectPlayer** - A new instance of the redirect result. ``` -------------------------------- ### PingOptions.builder() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/PingOptions.html Creates a new builder instance to construct a PingOptions object. ```APIDOC ## static PingOptions.Builder builder() ### Description Creates a new builder to assign values to a new PingOptions object. ### Returns - **PingOptions.Builder** - A new builder instance. ``` -------------------------------- ### Favicon.create(BufferedImage image) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/Favicon.html Creates a new Favicon instance from a BufferedImage. ```APIDOC ## Favicon.create(BufferedImage image) ### Description Creates a new Favicon instance from the provided BufferedImage. ### Parameters - **image** (BufferedImage) - The image to use for the favicon. ### Returns - **Favicon** - The created Favicon instance. ``` -------------------------------- ### TabListEntry.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/TabListEntry.Builder.html Methods available on the TabListEntry.Builder to configure and build a TabListEntry. ```APIDOC ## TabListEntry.Builder Methods ### tabList(TabList tabList) Sets the parent TabList for this entry. The entry will only be able to be added to that specific TabList. ### profile(GameProfile profile) Sets the GameProfile of the TabListEntry. ### chatSession(ChatSession chatSession) Sets the IdentifiedKey of the TabListEntry. This only works for players currently not connected to this proxy. ### displayName(@Nullable Component displayName) Sets the displayed name of the TabListEntry. ### latency(int latency) Sets the latency of the TabListEntry. ### gameMode(int gameMode) Sets the game mode of the TabListEntry. ### listed(boolean listed) Sets whether this entry should be visible. ### listOrder(int order) Sets the order/priority of this entry in the tab list (Since Minecraft 1.21.2). ### showHat(boolean showHat) Sets whether this entry's hat layer should be shown in the tab list. ### build() Constructs the TabListEntry specified by this builder. ``` -------------------------------- ### ResourcePackInfo.asBuilder() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/class-use/ResourcePackInfo.Builder.html Creates a builder from an existing ResourcePackInfo instance to allow for modifications. ```APIDOC ## ResourcePackInfo.asBuilder() ### Description Returns a copy of this ResourcePackInfo instance as a builder so that it can be modified. ``` -------------------------------- ### QueryResponse.getPlugins() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/class-use/QueryResponse.PluginInformation.html Retrieves the collection of plugins configured for the query response. ```APIDOC ### Method `Collection getPlugins()` ### Description Returns the list of plugins that will be used to reply to server list ping queries. ``` -------------------------------- ### getServerInfo() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ServerConnection.html Returns the server info for this connection. ```APIDOC ## ServerInfo getServerInfo() ### Description Returns the server info for this connection. ### Returns - **ServerInfo** - The server info for this connection. ``` -------------------------------- ### PreLoginEvent.PreLoginComponentResult.denied(Component reason) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/connection/class-use/PreLoginEvent.PreLoginComponentResult.html Denies the login with the specified reason. ```APIDOC ### static PreLoginEvent.PreLoginComponentResult denied(Component reason) Denies the login with the specified reason. ``` -------------------------------- ### Scheduler.TaskBuilder Configuration Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/scheduler/class-use/Scheduler.TaskBuilder.html Methods to configure timing and repetition for scheduled tasks. ```APIDOC ## TaskBuilder Configuration ### Methods - **clearDelay()**: Clears the delay on this task. - **clearRepeat()**: Clears the repeat interval on this task. - **delay(long time, TimeUnit unit)**: Specifies that the task should delay its execution by the specified amount of time. - **delay(Duration duration)**: Specifies that the task should delay its execution by the specified amount of time. - **repeat(long time, TimeUnit unit)**: Specifies that the task should continue running after waiting for the specified amount, until it is cancelled. - **repeat(Duration duration)**: Specifies that the task should continue running after waiting for the specified amount, until it is cancelled. ``` -------------------------------- ### transferToHost(InetSocketAddress address) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Transfers a Player to a host. ```APIDOC ### void transferToHost(InetSocketAddress address) Transfers a Player to a host. **Parameters:** - address (InetSocketAddress) - the host address ``` -------------------------------- ### Favicon.create(Path path) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/Favicon.html Creates a new Favicon instance by reading an image from a file path. ```APIDOC ## Favicon.create(Path path) ### Description Creates a new Favicon instance by reading the image file from the specified path. ### Parameters - **path** (Path) - The file path to the image. ### Returns - **Favicon** - The created Favicon instance. ### Throws - **IOException** - If the file could not be read from the path. ``` -------------------------------- ### Mod(String id, String version) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/ModInfo.Mod.html Creates a new instance of Mod with the specified identifier and version. ```APIDOC ## Mod(String id, String version) ### Description Constructs a new Mod object to represent a mod sent to the client. ### Parameters - **id** (String) - The unique identifier for the mod. - **version** (String) - The version string of the mod. ``` -------------------------------- ### QueryResponse.Builder.plugins(QueryResponse.PluginInformation... plugins) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/class-use/QueryResponse.PluginInformation.html Adds one or more plugins to the QueryResponse builder. ```APIDOC ### Method `QueryResponse.Builder plugins(QueryResponse.PluginInformation... plugins)` ### Description Adds the specified plugins to the plugins list for the QueryResponse being built. ``` -------------------------------- ### suggestAsync(I invocation) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/InvocableCommand.html Provides tab complete suggestions for the specified invocation asynchronously. ```APIDOC ## CompletableFuture> suggestAsync(I invocation) ### Description Provides tab complete suggestions for the specified invocation asynchronously. Defaults to wrapping the value returned by suggest(CommandInvocation). ### Parameters - **invocation** (I) - The invocation context. ### Returns - **CompletableFuture>** - The tab complete suggestions. ``` -------------------------------- ### hasSentPlayerSettings() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Returns whether the player has sent its client settings. ```APIDOC ### boolean hasSentPlayerSettings() Returns whether the player has sent its client settings. **Returns:** true if the player has sent its client settings ``` -------------------------------- ### QueryResponse.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/QueryResponse.Builder.html Methods available for configuring and building a QueryResponse object. ```APIDOC ## QueryResponse.Builder Methods ### build() Builds a new QueryResponse with the supplied data. ### clearPlayers() Removes all players from the builder. ### clearPlugins() Clears all currently set plugins. ### currentPlayers(int currentPlayers) Sets the players that are currently claimed to be online. ### gameVersion(String gameVersion) Sets the game version for the response. ### hostname(String hostname) Sets the hostname for the response. ### map(String map) Sets the map that will appear in the response. ### maxPlayers(int maxPlayers) Sets the maximum number of players this server purportedly can hold. ### players(String... players) / players(Collection players) Adds the specified players to the player list. ### plugins(QueryResponse.PluginInformation... plugins) / plugins(Collection plugins) Adds the specified plugins to the plugins list. ### proxyHost(String proxyHost) Sets the host where this proxy is running. ### proxyPort(int proxyPort) Sets the port where this proxy is running. ### proxyVersion(String proxyVersion) Sets the proxy version. ``` -------------------------------- ### serverLink(Component label, String link) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/ServerLink.html Constructs a server link with a custom component label. ```APIDOC ## static ServerLink serverLink(Component label, String link) ### Description Constructs a new ServerLink instance using a custom component as the label. ### Parameters - **label** (Component) - The custom component label to display. - **link** (String) - The URL to open when the link is clicked. ``` -------------------------------- ### getServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ServerConnection.html Returns the server that this connection is connected to. ```APIDOC ## RegisteredServer getServer() ### Description Returns the server that this connection is connected to. ### Returns - **RegisteredServer** - The server this connection is connected to. ``` -------------------------------- ### getPlayer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.html Retrieves the player who is attempting to connect to the server. ```APIDOC ### Player getPlayer() Returns the player connecting to the server. ``` -------------------------------- ### QueryResponse.Builder Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/server/QueryResponse.Builder.html Methods available on the QueryResponse.Builder to configure and generate a QueryResponse instance. ```APIDOC ## QueryResponse.Builder Methods ### hostname(String hostname) Sets the hostname for the response. Returns the builder instance for chaining. ### gameVersion(String gameVersion) Sets the game version for the response. Returns the builder instance for chaining. ### map(String map) Sets the map name for the response. Returns the builder instance for chaining. ### currentPlayers(int currentPlayers) Sets the number of players currently online. Returns the builder instance for chaining. ### maxPlayers(int maxPlayers) Sets the maximum player capacity. Returns the builder instance for chaining. ### proxyHost(String proxyHost) Sets the proxy host address. Returns the builder instance for chaining. ### proxyPort(int proxyPort) Sets the proxy port. Returns the builder instance for chaining. ### players(Collection players) / players(String... players) Adds players to the player list. Returns the builder instance for chaining. ### clearPlayers() Removes all players from the builder. Returns the builder instance for chaining. ### proxyVersion(String proxyVersion) Sets the proxy version string. Returns the builder instance for chaining. ### plugins(Collection plugins) / plugins(QueryResponse.PluginInformation... plugins) Adds plugins to the plugin list. Returns the builder instance for chaining. ### clearPlugins() Clears all currently set plugins. Returns the builder instance for chaining. ### build() Builds and returns a new QueryResponse instance. ``` -------------------------------- ### ServerPing.Builder.notModCompatible Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Defines the server as mod incompatible in the response. ```APIDOC ## notModCompatible() ### Description Defines the server as mod incompatible in the response. ``` -------------------------------- ### PluginDependency(String id, String version, boolean optional) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/plugin/meta/PluginDependency.html Creates a new instance of a plugin dependency. ```APIDOC ## PluginDependency(String id, String version, boolean optional) ### Description Creates a new instance of a plugin dependency. ### Parameters - **id** (String) - The plugin ID. - **version** (String) - An optional version string. - **optional** (boolean) - Whether or not this dependency is optional. ``` -------------------------------- ### PlayerSettings Methods Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/PlayerSettings.html Methods available on the PlayerSettings interface to retrieve client configuration. ```APIDOC ## PlayerSettings Methods ### getLocale() Returns the locale of the Minecraft client. ### getViewDistance() Returns the client's view distance. Note that this does not guarantee the client will see this many chunks. ### getChatMode() Returns the client's current chat display mode (PlayerSettings.ChatMode). ### hasChatColors() Returns whether or not the client has chat colors disabled. ### getSkinParts() Returns the parts of player skins the client will show (SkinParts). ### getMainHand() Returns the player's selected dominant hand (PlayerSettings.MainHand). ### isClientListingAllowed() Returns whether the client explicitly allows listing on the TabList in anonymous mode. Always false on clients older than 1.18. ### isTextFilteringEnabled() Returns if the client has text filtering enabled. ### getParticleStatus() Returns the client's current 'Particles' option state (PlayerSettings.ParticleStatus). ``` -------------------------------- ### executeAsync Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandManager.html Attempts to asynchronously execute a command from the given command line string. ```APIDOC ### executeAsync(CommandSource source, String cmdLine) Attempts to asynchronously execute a command from the given `cmdLine`. #### Parameters - **source** (CommandSource) - The source to execute the command for. - **cmdLine** (String) - The command to run. #### Returns - **CompletableFuture** - A future that may be completed with the result of the command execution. ``` -------------------------------- ### metaBuilder(String alias) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandManager.html Creates a builder for CommandMeta using an alias. ```APIDOC ### metaBuilder(String alias) Returns a builder to create a CommandMeta with the given alias. #### Parameters - **alias** (String) - Required - The first command alias. #### Returns - **CommandMeta.Builder** - A builder for CommandMeta. ``` -------------------------------- ### ProxyServer.createResourcePackBuilder(String url) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/class-use/ResourcePackInfo.Builder.html Creates a new builder instance to construct a ResourcePackInfo object for a given resource pack URL. ```APIDOC ## ProxyServer.createResourcePackBuilder(String url) ### Description Creates a builder to build a ResourcePackInfo instance for use with Player.sendResourcePackOffer(ResourcePackInfo). ### Parameters - **url** (String) - The URL of the resource pack. ``` -------------------------------- ### ProxyServer.getVersion() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/class-use/ProxyVersion.html Retrieves the version of the proxy server currently running. ```APIDOC ## ProxyServer.getVersion() ### Description Returns the version of the proxy as a ProxyVersion object. ### Method GET (SDK Method) ### Signature ProxyVersion getVersion() ### Returns - **ProxyVersion** - The version information of the proxy server. ``` -------------------------------- ### schedule() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/scheduler/Scheduler.TaskBuilder.html Schedules this task for execution. ```APIDOC ### Method `ScheduledTask schedule()` ### Description Schedules this task for execution. ### Returns - **ScheduledTask** - The scheduled task. ``` -------------------------------- ### ServerPing.Builder.nullPlayers Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Enables nulling Players in the response. ```APIDOC ## nullPlayers() ### Description Enables nulling Players in the response. ``` -------------------------------- ### getVersion() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/ModInfo.Mod.html Retrieves the version of the mod. ```APIDOC ## String getVersion() ### Description Returns the mod version string. ``` -------------------------------- ### ServerPing.Builder.favicon(Favicon favicon) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/class-use/Favicon.html Sets the favicon to be used in the server ping response. ```APIDOC ## ServerPing.Builder.favicon(Favicon favicon) ### Description Uses the `favicon` in the response. ### Method ServerPing.Builder favicon(Favicon favicon) ``` -------------------------------- ### MinecraftChannelIdentifier.create(String namespace, String name) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/messages/MinecraftChannelIdentifier.html Creates a new channel identifier with a specific namespace and name. ```APIDOC ## static MinecraftChannelIdentifier create(String namespace, String name) ### Description Creates an identifier in the specified namespace. ### Parameters - **namespace** (String) - The namespace to use. - **name** (String) - The channel name inside the specified namespace. ### Returns - **MinecraftChannelIdentifier** - A new channel identifier instance. ``` -------------------------------- ### getDescription() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/plugin/PluginContainer.html Retrieves the PluginDescription object associated with the plugin. ```APIDOC ### PluginDescription getDescription() Returns the plugin's description metadata. ``` -------------------------------- ### getServer() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.ServerResult.html Retrieves the server associated with this result. ```APIDOC ### Optional getServer() Returns the server associated with this result, if one is present. #### Returns - **Optional** - An optional containing the server, or empty if not applicable. ``` -------------------------------- ### getReasonComponent() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/ConnectionRequestBuilder.Result.html Returns an optional textual reason for the failure to connect to the server. ```APIDOC ### Optional getReasonComponent() Returns an (optional) textual reason for the failure to connect to the server. **Returns:** - `Optional`: the reason why the user could not connect to the server. ``` -------------------------------- ### PlayerEnterConfigurationEvent Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/configuration/PlayerEnterConfigurationEvent.html Represents the event fired when a player is about to enter the configuration state. ```APIDOC ## PlayerEnterConfigurationEvent ### Description This event is executed when a player is about to enter the configuration state. It is not called for the initial configuration of a player after login. Velocity will wait for this event for a maximum of 5 seconds. ### Constructor `PlayerEnterConfigurationEvent(@NotNull Player player, ServerConnection server)` ### Methods - **player()** (@NotNull Player) - Returns the player who is about to enter the configuration state. - **server()** (ServerConnection) - Returns the server that wants to reconfigure the player. ``` -------------------------------- ### createConnectionRequest(RegisteredServer server) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/Player.html Creates a new connection request so that the player can connect to another server. ```APIDOC ### ConnectionRequestBuilder createConnectionRequest(RegisteredServer server) Creates a new connection request so that the player can connect to another server. **Parameters:** - server (RegisteredServer) - the server to connect to **Returns:** a new connection request ``` -------------------------------- ### EventTask.resumeWhenComplete(CompletableFuture) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/EventTask.html Creates a continuation based EventTask for the given CompletableFuture. ```APIDOC ### static EventTask resumeWhenComplete(CompletableFuture future) Creates a continuation based `EventTask` for the given `CompletableFuture`. The continuation is resumed upon completion of the given `future`. #### Parameters - **future** (CompletableFuture) - The task to wait for. ``` -------------------------------- ### PermissionsSetupEvent Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/permission/PermissionsSetupEvent.html Represents the event fired when a PermissionSubject's permissions are being set up. This event allows for the customization of permission providers. ```APIDOC ## PermissionsSetupEvent ### Description This event is called once per subject during initialization. Velocity waits for this event to complete before proceeding with server startup or player login. ### Methods #### getSubject() Returns the `PermissionSubject` associated with this event. #### getProvider() Returns the current `PermissionProvider` configured for this subject. #### setProvider(PermissionProvider provider) Sets the `PermissionProvider` to be used for the subject. Passing `null` resets it to the default provider. #### createFunction(PermissionSubject subject) Uses the current provider to generate a `PermissionFunction` for the specified subject. ``` -------------------------------- ### fromInstance Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/plugin/PluginManager.html Retrieves the PluginContainer associated with a specific plugin instance. ```APIDOC ### fromInstance(Object instance) Retrieves the `PluginContainer` associated with the provided plugin instance. **Parameters:** - `instance` (Object) - The plugin instance to look up. **Returns:** - `Optional` - The container for the instance, if found. ``` -------------------------------- ### GameProfile Constructors Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/GameProfile.html Constructors for creating a new immutable Mojang game profile. ```APIDOC ## GameProfile(String undashedId, String name, List properties) ## GameProfile(UUID id, String name, List properties) ### Description Creates a new immutable Mojang game profile instance. ### Parameters - **undashedId** (String) - The undashed, Mojang-style UUID. - **id** (UUID) - The unique identifier for the profile. - **name** (String) - The username associated with the profile. - **properties** (List) - A list of profile properties. ``` -------------------------------- ### register(CommandMeta meta, Command command) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/CommandManager.html Registers a command with the provided metadata. ```APIDOC ### register(CommandMeta meta, Command command) Registers the specified command with the given metadata. #### Parameters - **meta** (CommandMeta) - Required - The command metadata. - **command** (Command) - Required - The command to register. #### Throws - **IllegalArgumentException** - If one of the given aliases is already registered, or the given command does not implement a registrable Command subinterface. ``` -------------------------------- ### Send a plugin message using an encoder Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/messages/ChannelMessageSink.html Demonstrates how to send a plugin message using a lambda-based PluginMessageEncoder to write data to the output stream. ```java final ChannelMessageSink target; final ChannelIdentifier identifier; final boolean result = target.sendPluginMessage(identifier, (output) -> { output.writeUTF("some input"); output.writeInt(1); }); ``` -------------------------------- ### CommandManager.executeAsync Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/command/class-use/CommandSource.html Attempts to asynchronously execute a command from the given command line string using the specified CommandSource. ```APIDOC ## CompletableFuture CommandManager.executeAsync(CommandSource source, String cmdLine) ### Description Attempts to asynchronously execute a command from the given `cmdLine` using the provided `CommandSource`. ### Parameters - **source** (CommandSource) - The source executing the command. - **cmdLine** (String) - The command string to execute. ``` -------------------------------- ### PlayerSettings.hasChatColors() Source: https://jd.papermc.io/velocity/4.1.0/index-all.html Checks the player's chat color settings. ```APIDOC ## hasChatColors() ### Description Returns whether or not the client has chat colors disabled. ``` -------------------------------- ### plugin() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/scheduler/ScheduledTask.html Retrieves the plugin instance that originally scheduled the task. ```APIDOC ## @NotNull Object plugin() ### Description Returns the plugin that scheduled this task. ### Returns - **Object** - The plugin that scheduled this task. ``` -------------------------------- ### PlayerSettings.getChatMode() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/proxy/player/class-use/PlayerSettings.ChatMode.html Retrieves the current chat display mode configured by the client. ```APIDOC ## PlayerSettings.getChatMode() ### Description Returns the chat setting for the client. ### Returns - **PlayerSettings.ChatMode** - The current chat display mode. ``` -------------------------------- ### toString() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/proxy/ProxyReloadEvent.html Returns a string representation of the ProxyReloadEvent. ```APIDOC ## String toString() ### Description Returns a string representation of the event object. ``` -------------------------------- ### denied() Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.ServerResult.html Creates a result that prevents the player from connecting to another server. ```APIDOC ### static ServerResult denied() Returns a result that will prevent players from connecting to another server. If this result is used, the connection request status will be set to CONNECTION_CANCELLED. #### Returns - **ServerResult** - A result to deny connections. ``` -------------------------------- ### Favicon(String base64Url) Source: https://jd.papermc.io/velocity/4.1.0/com/velocitypowered/api/util/Favicon.html Creates a new Favicon instance directly from a Base64 URL string. ```APIDOC ## Favicon(String base64Url) ### Description Directly creates a favicon using its Base64 URL. It is generally recommended to use the static create() methods instead. ### Parameters - **base64Url** (String) - The Base64 URL string for the favicon. ```