### SkinsRestorer API Overview Source: https://jd.skinsrestorer.net/allclasses-index This section provides an overview of the SkinsRestorer API, including links to example plugins and documentation, and information on how to get help. ```APIDOC ## SkinsRestorer API ### Description Provides access to the SkinsRestorer API for managing player skins and related functionalities. ### Method N/A (This is an overview) ### Endpoint N/A (This is an overview) ### Documentation Links - [SkinsRestorer API Docs](https://docs.skinsrestorer.net/) - [API Example Plugin](https://github.com/SkinsRestorer/SkinsRestorer-API-Example) ### Support Join our Discord for advanced help or if you encounter problems before submitting issues. ``` -------------------------------- ### VersionProvider - Get Semantic Version Source: https://jd.skinsrestorer.net/index-all Retrieves the semantic version of the installed SkinsRestorer. ```APIDOC ## VersionProvider - Get Semantic Version ### Description Returns the semantic version of SkinsRestorer installed on the server. This is useful for third-party plugins to detect the installed version and ensure compatibility. ### Method `getSemanticVersion()` - Static method ### Endpoint (Not applicable - This is a static method call within the Java API) ### Parameters None ### Request Example (Not applicable) ### Response - **String**: The semantic version string (e.g., "15.0.0"). ### Response Example ```java String version = VersionProvider.getSemanticVersion(); // Example: "15.0.0" ``` ``` -------------------------------- ### SkinsRestorer API - Get Version Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the version of the installed SkinsRestorer. ```APIDOC ## GET /api/skinsrestorer/version ### Description Retrieves the version of the installed SkinsRestorer. ### Method GET ### Endpoint /api/skinsrestorer/version ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **version** (String) - The version of SkinsRestorer. #### Response Example { "version": "1.17.1" } ``` -------------------------------- ### SkinsRestorer Version Information (Java) Source: https://jd.skinsrestorer.net/index-all Provides methods to get the installed version of SkinsRestorer. This includes a direct method from the `SkinsRestorer` interface and static methods from `VersionProvider` for general use and third-party integration. ```java getVersion() getVersionInfo() ``` -------------------------------- ### Get SkinsRestorer Version Information (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the version, commit, and short commit of the installed SkinsRestorer. These methods are marked as internal and provide specific string representations of the installation's build details. ```java String getVersion() @Internal String getVersion() Return the version of SkinsRestorer installed on the server. Returns: The version of SkinsRestorer installed on the server. String getCommit() @Internal String getCommit() Return the commit of SkinsRestorer installed on the server. Returns: The commit of SkinsRestorer installed on the server. String getCommitShort() @Internal String getCommitShort() Return the short commit of SkinsRestorer installed on the server. Returns: The short commit of SkinsRestorer installed on the server. ``` -------------------------------- ### SkinsRestorerProvider - Get Instance Source: https://jd.skinsrestorer.net/index-all Retrieves the singleton instance of the SkinsRestorer API. ```APIDOC ## SkinsRestorerProvider - Get Instance ### Description Gets the singleton instance of the SkinsRestorer API. This is the primary way to access the API's functionality. ### Method `get()` - Static method ### Endpoint (Not applicable - This is a static method call within the Java API) ### Parameters None ### Request Example (Not applicable) ### Response - **SkinsRestorer**: An instance of the SkinsRestorer API. ### Response Example ```java SkinsRestorer api = SkinsRestorerProvider.get(); ``` ``` -------------------------------- ### Version Compatibility Source: https://jd.skinsrestorer.net/allclasses-index Helper class for checking API version compatibility with the installed SkinsRestorer version. ```APIDOC ## VersionProvider ### Description A helper class for third-party plugins to check if their used API version is compatible with the installed SkinsRestorer version. ### Method N/A (This describes a class/utility) ### Endpoint N/A (This describes a class/utility) ``` -------------------------------- ### SkinsRestorer API - Get Commit Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the full commit hash of the installed SkinsRestorer. ```APIDOC ## GET /api/skinsrestorer/commit ### Description Retrieves the full commit hash of the installed SkinsRestorer. ### Method GET ### Endpoint /api/skinsrestorer/commit ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **commit** (String) - The full commit hash of SkinsRestorer. #### Response Example { "commit": "a1b2c3d4e5f67890abcdef1234567890abcdef12" } ``` -------------------------------- ### JavaDoc Search Examples Source: https://jd.skinsrestorer.net/help-doc Illustrates how to use the JavaDoc search functionality to find API elements using partial names, camel case abbreviations, or multiple search terms. ```text "j.l.obj" matches "java.lang.Object" "InpStr" matches "java.io.InputStream" "math exact long" matches "java.lang.Math.absExact(long)" ``` -------------------------------- ### SkinsRestorer API - Get Commit Short Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the short commit hash of the installed SkinsRestorer. ```APIDOC ## GET /api/skinsrestorer/commit/short ### Description Retrieves the short commit hash of the installed SkinsRestorer. ### Method GET ### Endpoint /api/skinsrestorer/commit/short ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **commitShort** (String) - The short commit hash of SkinsRestorer. #### Response Example { "commitShort": "a1b2c3d" } ``` -------------------------------- ### SkinsRestorerProvider Constructor (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorerProvider Initializes a new instance of the SkinsRestorerProvider class. This constructor is part of the core API setup. ```java public SkinsRestorerProvider() ``` -------------------------------- ### SkinsRestorer - Get Commit Information Source: https://jd.skinsrestorer.net/index-all Retrieves commit information for the installed SkinsRestorer version. ```APIDOC ## SkinsRestorer - Get Commit Information ### Description Retrieves the full Git commit hash of the currently installed SkinsRestorer version. ### Method `getCommit()` ### Endpoint (Not applicable - This is a method call on the SkinsRestorer instance) ### Parameters None ### Request Example (Not applicable) ### Response - **String**: The 40-character Git commit hash. ### Response Example ```java String commit = skinsRestorerInstance.getCommit(); // Example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0" ``` ``` -------------------------------- ### Get Version Information String Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/VersionProvider This static method returns a formatted string representing the installed SkinsRestorer version and its git commit hash. This is useful for plugins to display informative messages to server administrators, such as "Expected SkinsRestorer 16.0.0+, but found [SkinsRestorer 15.0.0 (a1b2c3d)]". ```java public static String getVersionInfo() Returns the version of SkinsRestorer installed on the server for a third-party plugin to use for a message. E.g. "Expected SkinsRestorer 16.0.0+, but found [SkinsRestorer 15.0.0 (a1b2c3d)]". Returns: The version of SkinsRestorer installed on the server. The format is "SkinsRestorer [version] ([first six letters of commit])" but might change in the future. (e.g. "SkinsRestorer 15.0.0 (a1b2c3d)") ``` -------------------------------- ### SkinsRestorer API - Get Mojang API Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the MojangAPI instance for interacting with Mojang services. ```APIDOC ## GET /api/skinsrestorer/mojangapi ### Description Retrieves the MojangAPI instance for interacting with Mojang services. ### Method GET ### Endpoint /api/skinsrestorer/mojangapi ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **MojangAPI** (object) - An instance of MojangAPI. #### Response Example { "MojangAPI": "" } ``` -------------------------------- ### Get Version String Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/VersionProvider This static method retrieves the current version of SkinsRestorer installed on the server as a simple string, typically in a 'major.minor.patch' format. ```java public static String getVersion() Returns the version of SkinsRestorer installed on the server. Returns: The version of SkinsRestorer installed on the server. (e.g. "15.1.2") ``` -------------------------------- ### Get SkinsRestorer Semantic Version (Java) Source: https://jd.skinsrestorer.net/index-all Returns the semantic version string of the installed SkinsRestorer. This allows third-party plugins to determine API compatibility. ```Java net.skinsrestorer.api.VersionProvider.getSemanticVersion() ``` -------------------------------- ### Get Semantic Version Array Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/VersionProvider This static method returns the SkinsRestorer's semantic version as an integer array. Plugins can use this to programmatically determine the installed version and select the appropriate API implementation. ```java public static int[] getSemanticVersion() Returns the semantic version of SkinsRestorer installed on the server for a third-party plugin to use for detecting the version of SkinsRestorer installed on the server to find the right API implementation to use. Returns: The semantic version of SkinsRestorer installed on the server. (e.g. `[15, 1, 2]` for "15.1.2") ``` -------------------------------- ### MojangProfileTextures Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/model/MojangProfileTextures Provides methods to get and set skin and cape textures for a Mojang profile. ```APIDOC ## MojangProfileTextures ### Description Represents the textures associated with a Mojang profile, including skin and cape. ### Constructor - **MojangProfileTextures()**: Creates a new instance of MojangProfileTextures. ### Methods - **getSKIN()**: Returns the MojangProfileTexture for the skin. - **getCAPE()**: Returns the MojangProfileTexture for the cape. - **setSKIN(MojangProfileTexture SKIN)**: Sets the skin texture. - **setCAPE(MojangProfileTexture CAPE)**: Sets the cape texture. - **equals(Object o)**: Checks if this object is equal to another object. - **canEqual(Object other)**: Checks if another object can be equal to this one. - **hashCode()**: Returns the hash code value for this object. - **toString()**: Returns a string representation of the object. ``` -------------------------------- ### Get Git Commit Hash Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/VersionProvider This static method returns the full 40-character git commit hash of the currently installed SkinsRestorer build. This can be used for precise version identification and debugging. ```java public static String getCommit() Returns the 40 letter git commit of SkinsRestorer installed on the server. Returns: The 40 letter git commit of SkinsRestorer installed on the server. ``` -------------------------------- ### SkinProperty Methods - Java Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/property/SkinProperty Lists and describes the methods available in the SkinProperty class. Includes methods for checking equality, getting signature and value, hashing, and static methods for creating or parsing SkinProperty objects. ```java protected boolean canEqual(@Nullable Object other) ``` ```java boolean equals(@Nullable Object o) ``` ```java @NonNull String getSignature() ``` ```java @NonNull String getValue() ``` ```java int hashCode() ``` ```java static @NotNull SkinProperty of(@NonNull String value, @NonNull String signature) ``` ```java @NotNull String toString() ``` ```java static Optional tryParse(String name, String value, String signature) ``` -------------------------------- ### Get SkinsRestorer Short Commit Version (Java) Source: https://jd.skinsrestorer.net/index-all Returns a shortened Git commit hash of the installed SkinsRestorer version. Useful for display purposes or quick identification. ```Java net.skinsrestorer.api.SkinsRestorer.getCommitShort() ``` -------------------------------- ### SkinsRestorer API - Get MineSkin API Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the MineSkinAPI instance for interacting with MineSkin services. ```APIDOC ## GET /api/skinsrestorer/mineskinapi ### Description Retrieves the MineSkinAPI instance for interacting with MineSkin services. ### Method GET ### Endpoint /api/skinsrestorer/mineskinapi ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **MineSkinAPI** (object) - An instance of MineSkinAPI. #### Response Example { "MineSkinAPI": "" } ``` -------------------------------- ### Retrieve Texture Hash and URL (Java) Source: https://jd.skinsrestorer.net/index-all Methods to get the texture hash and the full texture URL from `MojangProfileTexture` objects. Includes a deprecated method for getting a stripped URL. ```java getStrippedUrl() getTextureHash() getUrl() ``` -------------------------------- ### Get SkinsRestorer Storage and API Instances (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Provides access to various storage mechanisms and API clients used by SkinsRestorer. These methods return specific instances required for interacting with the plugin's core functionalities. ```java SkinStorage getSkinStorage() Returns: SkinStorage instance PlayerStorage getPlayerStorage() Returns: PlayerStorage instance CacheStorage getCacheStorage() Returns: CacheStorage instance MojangAPI getMojangAPI() Returns: MojangAPI instance MineSkinAPI getMineSkinAPI() Returns: MineSkinAPI instance EventBus getEventBus() Returns: EventBus instance ``` -------------------------------- ### Get SkinsRestorer API Instance (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorerProvider Retrieves the singleton instance of the SkinsRestorer API. This is the primary method for plugins to interact with the SkinsRestorer functionality. ```java public static SkinsRestorer get() ``` -------------------------------- ### MojangProfileTextures Constructor and Methods (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/model/MojangProfileTextures Provides the default constructor for MojangProfileTextures and methods to get and set skin and cape textures. Also includes equals, hashCode, and toString implementations. ```java public class MojangProfileTextures extends Object * * ## Constructor Summary Constructors Constructor Description `MojangProfileTextures()` * * ## Method Summary All MethodsInstance MethodsConcrete Methods Modifier and Type Method Description `protected boolean` `canEqual(@Nullable Object other)` `boolean` `equals(@Nullable Object o)` `MojangProfileTexture` `getCAPE()` `MojangProfileTexture` `getSKIN()` `int` `hashCode()` `void` `setCAPE(MojangProfileTexture CAPE)` `void` `setSKIN(MojangProfileTexture SKIN)` `@NotNull String` `toString()` ### Methods inherited from class java.lang.Object `clone, finalize, getClass, notify, notifyAll, wait, wait, wait` * * ## Constructor Details * ### MojangProfileTextures public MojangProfileTextures() * ## Method Details * ### getSKIN public MojangProfileTexture getSKIN() * ### getCAPE public MojangProfileTexture getCAPE() * ### setSKIN public void setSKIN(MojangProfileTexture SKIN) * ### setCAPE public void setCAPE(MojangProfileTexture CAPE) * ### equals public boolean equals(@Nullable @Nullable Object o) Overrides: `equals` in class `Object` * ### canEqual protected boolean canEqual(@Nullable @Nullable Object other) * ### hashCode public int hashCode() Overrides: `hashCode` in class `Object` * ### toString @NotNull public @NotNull String toString() Overrides: `toString` in class `Object` ``` -------------------------------- ### SkinsRestorer API - Get Player Storage Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the PlayerStorage instance for managing player data. ```APIDOC ## GET /api/skinsrestorer/playerstorage ### Description Retrieves the PlayerStorage instance for managing player data. ### Method GET ### Endpoint /api/skinsrestorer/playerstorage ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **PlayerStorage** (object) - An instance of PlayerStorage. #### Response Example { "PlayerStorage": "" } ``` -------------------------------- ### SkinsRestorer API - Get Skin Storage Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the SkinStorage instance for managing skin data. ```APIDOC ## GET /api/skinsrestorer/skinstorage ### Description Retrieves the SkinStorage instance for managing skin data. ### Method GET ### Endpoint /api/skinsrestorer/skinstorage ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **SkinStorage** (object) - An instance of SkinStorage. #### Response Example { "SkinStorage": "" } ``` -------------------------------- ### Get SkinsRestorer API Instance (Java) Source: https://jd.skinsrestorer.net/index-all Retrieves the singleton instance of the SkinsRestorer API. This method is static and provides access to the core functionalities of the plugin. ```Java net.skinsrestorer.api.SkinsRestorerProvider.get() ``` -------------------------------- ### Get SkinsRestorer SkinApplier (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Obtains an instance of the SkinApplier, which is responsible for applying skins to players. This method requires the player's class as a parameter to correctly instantiate the applier. ```java

SkinApplier

getSkinApplier(Class

playerClass) Type Parameters: `P` - player class Parameters: `playerClass` - class of the player class in your server implementation Returns: SkinApplier instance ``` -------------------------------- ### Get Profile by UUID Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/connections/MojangAPI Retrieve profile information, specifically the SkinProperty, for a player using their UUID. ```APIDOC ## GET /api/mojang/user/profile/{uuid} ### Description Fetches the profile information, including the SkinProperty, for a player using their UUID. ### Method GET ### Endpoint `/api/mojang/user/profile/{uuid}` ### Parameters #### Path Parameters - **uuid** (UUID) - Required - The unique identifier of the player. ### Response #### Success Response (200) - **skinProperty** (SkinProperty) - The skin property of the player. #### Response Example ```json { "skinProperty": { "value": "ewogICAgImlhdCI6IDE2NzgwMzQ5MjcsCiAgICAidWlkIjoiMjM2MDZjNTItNmY5MS00YjIwLWE0MjktN2U4NDExN2UwMDNlIiwKICAgICJuYW1lIjoiTWluZWNyYWZ0IiwKICAgICJhdmF0YXIiOiAieHVybDpsZWdhY3k6dXNlcm1ldGE6NjQ0OWI0MTItZDQzYS00NTQ0LWE0YjktYzBkYmM2ODgxNmJmOm1pbmVjcmFmdCIKICB9", "signature": "cGQ0S3RkZ25rY3lqTVE2bUZmTk90cGlxRXh4N1hUOU84ZGRHVlgrQjB3Y1I0Q2pNT2ZMRkhkbFRkZE1qVnZpSm5vQkZ2ZGp5VjNtd1d3bE94SW1mNWpkZjlWdzZZNU9sZFB3ZzB2ZVV6MXN2ZURqRXhIQWV6WGh2WFNzWVhKNUh3a29xVGVtUWZNV05aYVp1b0Nxcw==" } } ``` ``` -------------------------------- ### SkinsRestorer API - Get Event Bus Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves the EventBus instance for event handling. ```APIDOC ## GET /api/skinsrestorer/eventbus ### Description Retrieves the EventBus instance for event handling. ### Method GET ### Endpoint /api/skinsrestorer/eventbus ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **EventBus** (object) - An instance of EventBus. #### Response Example { "EventBus": "" } ``` -------------------------------- ### VersionProvider Class Overview Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/VersionProvider The VersionProvider class serves as a helper for third-party plugins to determine if their utilized API version is compatible with the installed SkinsRestorer server version. Its absence indicates an outdated API usage (V14 or below). ```java package net.skinsrestorer.api; public class VersionProvider extends Object { public VersionProvider() { } public static String getCommit() { return null; } public static int[] getSemanticVersion() { return null; } public static String getVersion() { return null; } public static String getVersionInfo() { return null; } public static boolean isCompatibleWith(String version) { return false; } } ``` -------------------------------- ### SkinsRestorer API - Get Skin Applier Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/SkinsRestorer Retrieves a SkinApplier instance for a specific player class. ```APIDOC ## GET /api/skinsrestorer/skinapplier/{playerClass} ### Description Retrieves a SkinApplier instance for a specific player class. ### Method GET ### Endpoint /api/skinsrestorer/skinapplier/{playerClass} ### Parameters #### Path Parameters - **playerClass** (Class) - Required - The class of the player. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **SkinApplier** (object) - An instance of SkinApplier for the specified player class. #### Response Example { "SkinApplier": "" } ``` -------------------------------- ### MojangProfileTexture Class Methods Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/model/MojangProfileTexture This snippet includes various methods for the MojangProfileTexture class, such as getting and setting texture URLs, hashes, and metadata. It also shows overridden methods from the Object class like equals, hashCode, and toString. ```java public String getTextureHash() ``` ```java @Deprecated(forRemoval=true) public String getStrippedUrl() Deprecated, for removal: This API element is subject to removal in a future version. Use `getTextureHash()` instead. ``` ```java public String getUrl() ``` ```java public MojangProfileTextureMeta getMetadata() ``` ```java public void setUrl(String url) ``` ```java public void setMetadata(MojangProfileTextureMeta metadata) ``` ```java public boolean equals(@Nullable @Nullable Object o) Overrides: `equals` in class `Object` ``` ```java protected boolean canEqual(@Nullable @Nullable Object other) ``` ```java public int hashCode() Overrides: `hashCode` in class `Object` ``` ```java @NotNull public @NotNull String toString() Overrides: `toString` in class `Object` ``` -------------------------------- ### Get Skin and Profile Data Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/connections/MojangAPI Retrieve skin properties and associated data for a given player name or UUID. ```APIDOC ## GET /api/mojang/user/profile/{nameOrUniqueId} ### Description Fetches the skin property and associated data for a given player name or UUID. This method may return a hardcoded skin value for default players like "Steve" or "Alex". ### Method GET ### Endpoint `/api/mojang/user/profile/{nameOrUniqueId}` ### Parameters #### Path Parameters - **nameOrUniqueId** (String) - Required - The player's username or unique ID (dashed or non-dashed). ### Response #### Success Response (200) - **skinProperty** (SkinProperty) - The skin property of the player. - **mojangSkinDataResult** (MojangSkinDataResult) - The result of the skin data fetch. #### Response Example ```json { "skinProperty": { "value": "ewogICAgImlhdCI6IDE2NzgwMzQ5MjcsCiAgICAidWlkIjoiMjM2MDZjNTItNmY5MS00YjIwLWE0MjktN2U4NDExN2UwMDNlIiwKICAgICJuYW1lIjoiTWluZWNyYWZ0IiwKICAgICJhdmF0YXIiOiAieHVybDpsZWdhY3k6dXNlcm1ldGE6NjQ0OWI0MTItZDQzYS00NTQ0LWE0YjktYzBkYmM2ODgxNmJmOm1pbmVjcmFmdCIKICB9", "signature": "cGQ0S3RkZ25rY3lqTVE2bUZmTk90cGlxRXh4N1hUOU84ZGRHVlgrQjB3Y1I0Q2pNT2ZMRkhkbFRkZE1qVnZpSm5vQkZ2ZGp5VjNtd1d3bE94SW1mNWpkZjlWdzZZNU9sZFB3ZzB2ZVV6MXN2ZURqRXhIQWV6WGh2WFNzWVhKNUh3a29xVGVtUWZNV05aYVp1b0Nxcw==" }, "mojangSkinDataResult": { "name": "Minecraft", "id": "23606c52-6f91-4b20-a429-7e84117e003e", "properties": [ { "name": "textures", "value": "ewogICAgImlhdCI6IDE2NzgwMzQ5MjcsCiAgICAidWlkIjoiMjM2MDZjNTItNmY5MS00YjIwLWE0MjktN2U4NDExN2UwMDNlIiwKICAgICJuYW1lIjoiTWluZWNyYWZ0IiwKICAgICJhdmF0YXIiOiAieHVybDpsZWdhY3k6dXNlcm1ldGE6NjQ0OWI0MTItZDQzYS00NTQ0LWE0YjktYzBkYmM2ODgxNmJmOm1pbmVjcmFmdCIKICB9" } ] } } ``` ``` -------------------------------- ### Skin Management with SkinsRestorer Source: https://jd.skinsrestorer.net/allclasses-index Utilities and classes for managing player skins, including applying skins and handling skin data. ```APIDOC ## Skin Management Utilities ### Description Provides classes and interfaces for managing and applying skins to players within the SkinsRestorer ecosystem. ### Classes and Interfaces - **`PlayerStorage`**: Interface for storing and retrieving player skin data. - **`PropertyUtils`**: Utility class for retrieving skin-related information from profile properties. - **`SkinApplier

`**: Class for applying skins to players. - **`SkinApplyEvent`**: Interface representing an event fired when a skin is applied. - **`SkinIdentifier`**: Represents a reference skin that can be applied. - **`SkinProperty`**: Facilitates interaction with properties across different platforms. - **`SkinStorage`**: Manages different types of skins (Player, URL, Custom). - **`SkinType`**: Enum for different skin types. - **`SkinVariant`**: Enum for different skin variants. ``` -------------------------------- ### MineSkin API Integration Source: https://jd.skinsrestorer.net/allclasses-index Information on how to interact with the MineSkin API to generate skin values and signatures for fetching skins. ```APIDOC ## MineSkinAPI ### Description This class handles interactions with the MineSkin API to generate values and signatures for skin image URLs, speeding up skin fetching. ### Method N/A (This describes a class/utility) ### Endpoint N/A (This describes a class/utility) ### Related Classes - `MineSkinException` - `MineSkinResponse` ``` -------------------------------- ### SkinsRestorer Provider Source: https://jd.skinsrestorer.net/index-all Methods for interacting with the SkinsRestorer API instance and event bus. ```APIDOC ## POST /api/provider/setApi ### Description Sets the SkinsRestorer API instance. ### Method POST ### Endpoint /api/provider/setApi ### Parameters #### Request Body - **skinsRestorer** (SkinsRestorer) - Required - The SkinsRestorer API instance. ### Response #### Success Response (200) - **message** (string) - Confirmation of API instance set. #### Response Example { "message": "SkinsRestorer API instance set successfully." } ``` ```APIDOC ## POST /api/provider/subscribe ### Description Subscribes to an event from the event bus. ### Method POST ### Endpoint /api/provider/subscribe ### Parameters #### Request Body - **listener** (Object) - Required - The listener object. - **eventType** (Class) - Required - The class of the event type. - **consumer** (Consumer) - Required - The consumer for the event. ### Response #### Success Response (200) - **message** (string) - Confirmation of subscription. #### Response Example { "message": "Successfully subscribed to event." } ``` -------------------------------- ### Mojang API Integration Source: https://jd.skinsrestorer.net/allclasses-index Details on fetching Minecraft player data, including profiles and textures, from Mojang's API. ```APIDOC ## MojangAPI ### Description Fetches Minecraft player data from Mojang's API, including profile information and skin textures. ### Method N/A (This describes a class/utility) ### Endpoint N/A (This describes a class/utility) ### Related Classes - `MojangProfileResponse` - `MojangProfileTexture` - `MojangProfileTextureMeta` - `MojangProfileTextures` - `MojangSkinDataResult` ``` -------------------------------- ### Check API Version Compatibility (Java) Source: https://jd.skinsrestorer.net/index-all Determines if the provided API version is compatible with the installed SkinsRestorer version. This is crucial for maintaining backward compatibility and ensuring proper integration. ```java /** * Checks whether the given API version is compatible with the version of SkinsRestorer installed on the server. * @param version The API version string to check. * @return true if the version is compatible, false otherwise. */ public static boolean isCompatibleWith(String version) ``` -------------------------------- ### VersionProvider Constructor Source: https://jd.skinsrestorer.net/index-all Constructs a new VersionProvider object. This class is a helper for checking API version compatibility between plugins and SkinsRestorer. ```java public VersionProvider() ``` -------------------------------- ### Access Mojang Profile Data (Java) Source: https://jd.skinsrestorer.net/index-all Methods to retrieve textures and timestamps from `MojangProfileResponse` objects. Also includes methods for getting the unique ID from `MojangSkinDataResult`. ```java getTextures() getTimestamp() getUniqueId() ``` -------------------------------- ### SkinApplyEvent Interface Definition (Java) Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/event/SkinApplyEvent Defines the SkinApplyEvent interface, extending SkinsRestorerEvent. It provides methods to get the player, retrieve skin properties, and manage the event's cancellation state. ```java public interface SkinApplyEvent extends SkinsRestorerEvent {

P getPlayer(Class

playerClass); SkinProperty getProperty(); boolean isCancelled(); void setCancelled(boolean cancelled); void setProperty(SkinProperty property); } ``` -------------------------------- ### SkinApplier API - Apply Skin with Player Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/property/SkinApplier Applies a skin to a player that would be set on join. ```APIDOC ## POST /websites/jd_skinsrestorer_net/applySkin ### Description Applies a skin to a player that would be set on join. ### Method POST ### Endpoint /websites/jd_skinsrestorer_net/applySkin ### Parameters #### Request Body - **player** (object) - Required - The player object to apply the skin to. - **identifier** (object) - Optional - The SkinIdentifier to apply the skin from. - **property** (object) - Optional - The raw SkinProperty to apply. ### Request Example ```json { "player": {}, "identifier": {}, "property": {} } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "Skin applied successfully" } ``` ### Errors - **DataRequestException**: If the skin data could not be requested. ``` -------------------------------- ### Get SkinsRestorer Commit Version (Java) Source: https://jd.skinsrestorer.net/index-all Returns the full 40-character Git commit hash of the installed SkinsRestorer version. This is useful for plugin compatibility checks. ```Java net.skinsrestorer.api.SkinsRestorer.getCommit() ``` ```Java net.skinsrestorer.api.VersionProvider.getCommit() ``` -------------------------------- ### Get Skin Variant from Base64 String - Java Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/PropertyUtils Retrieves the skin variant (e.g., CLASSIC, SLIM) from a base64 encoded string representing profile data. ```java public static SkinVariant getSkinVariant(@NotNull String base64) { return null; } ``` -------------------------------- ### SkinsRestorer Event System Source: https://jd.skinsrestorer.net/allclasses-index Information about the event system used by the SkinsRestorer plugin. ```APIDOC ## SkinsRestorer Events ### Description Defines the event system for the SkinsRestorer plugin, allowing for custom event handling. ### Interfaces - **`EventBus`**: Event bus for SkinsRestorer. - **`SkinsRestorerEvent`**: Interface representing events triggered by the SkinsRestorer plugin. - **`SkinsRestorerProvider`**: Provides the SkinsRestorer API instance to other plugins. ``` -------------------------------- ### Get Decoded Profile Data from Base64 String - Java Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/PropertyUtils Decodes a base64 encoded string representing profile data to retrieve MojangProfileResponse, which contains skin and potentially cape information. ```java public static MojangProfileResponse getSkinProfileData(@NotNull String base64) { // Returns the decoded profile data from the profile property. This is useful for getting the skin data from the property and other information like cape. return null; } ``` -------------------------------- ### SkinsRestorer API Source: https://jd.skinsrestorer.net/index-all Methods for interacting with the SkinsRestorer service itself. ```APIDOC ## GET /api/skinsrestorer/version ### Description Return the version of SkinsRestorer installed on the server. ### Method GET ### Endpoint /api/skinsrestorer/version ### Response #### Success Response (200) - **version** (string) - The installed SkinsRestorer version. #### Response Example ```json { "version": "13.0.0" } ``` ``` -------------------------------- ### URL Skin Management Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/storage/SkinStorage APIs for managing skins linked via URLs, including setting skin data and index. ```APIDOC ## POST /api/url/skin ### Description Saves skin data associated with a URL, including MineSkin ID and variant information. ### Method POST ### Endpoint /api/url/skin ### Parameters #### Request Body - **url** (String) - Required - The URL of the skin. - **mineSkinId** (String) - Required - The ID from MineSkin. - **property** (SkinProperty) - Required - An object containing the skin's value and signature. - **skinVariant** (SkinVariant) - Required - The variant of the skin (e.g., CLASSIC, SLIM). ### Request Example ```json { "url": "http://example.com/skin.png", "mineSkinId": "12345", "property": { "value": "skin_value", "signature": "skin_signature" }, "skinVariant": "CLASSIC" } ``` ### Response #### Success Response (200) - **void** - Indicates the operation was successful. ## POST /api/url/skin/index ### Description Saves the skin variant index for a given URL. This helps in automatically selecting the correct skin variant. ### Method POST ### Endpoint /api/url/skin/index ### Parameters #### Request Body - **url** (String) - Required - The URL of the skin. - **skinVariant** (SkinVariant) - Required - The variant of the skin (e.g., CLASSIC, SLIM). ### Request Example ```json { "url": "http://example.com/skin.png", "skinVariant": "SLIM" } ``` ### Response #### Success Response (200) - **void** - Indicates the operation was successful. ## POST /api/url/skin/response ### Description Saves URL skin data to the database using a MineSkinResponse object. ### Method POST ### Endpoint /api/url/skin/response ### Parameters #### Request Body - **url** (String) - Required - The URL of the skin. - **response** (MineSkinResponse) - Required - The response object from MineSkin. ### Request Example ```json { "url": "http://example.com/skin.png", "response": { "id": "12345", "data": { "texture": { "value": "skin_value", "signature": "skin_signature" } }, "nextRequest": null } } ``` ### Response #### Success Response (200) - **void** - Indicates the operation was successful. ``` -------------------------------- ### SkinApplier API - Apply Skin with Property Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/property/SkinApplier Applies a raw skin property to a player. ```APIDOC ## POST /websites/jd_skinsrestorer_net/applySkin/property ### Description Applies a raw skin property to a player. You can use this to apply custom values to a player without needing to touch the storage. ### Method POST ### Endpoint /websites/jd_skinsrestorer_net/applySkin/property ### Parameters #### Request Body - **player** (object) - Required - The player object to apply the skin to. - **property** (object) - Required - The raw SkinProperty to apply. ### Request Example ```json { "player": {}, "property": {} } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "Skin applied successfully" } ``` ``` -------------------------------- ### Get Player Skin Data (Java) Source: https://jd.skinsrestorer.net/index-all Fetches the stored skin property for a player using their UUID. This method internally calls `PlayerStorage.getSkinIdOfPlayer(UUID)` to get the skin identifier first. ```java getSkinOfPlayer(UUID) ``` -------------------------------- ### MojangProfileResponse Constructor Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/model/MojangProfileResponse The default constructor for the MojangProfileResponse class. It initializes a new instance of the class. ```java public MojangProfileResponse() ``` -------------------------------- ### Get Skin Variant Information (Java) Source: https://jd.skinsrestorer.net/index-all Retrieves the skin variant, which is primarily used for `SkinType.URL` and is null otherwise. Also includes a static utility method to get the skin variant from a string or `SkinProperty`. ```java getSkinType() getSkinVariant() getSkinVariant(String) getSkinVariant(SkinProperty) ``` -------------------------------- ### Java Enum: SkinVariant Constants and Methods Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/property/SkinVariant This snippet shows the definition and usage of the SkinVariant enum in Java. It includes the CLASSIC and SLIM constants and the static methods 'values()' to get all constants and 'valueOf(String name)' to get a specific constant by its name. ```java public enum SkinVariant extends Enum { CLASSIC, SLIM; public static SkinVariant[] values() { // implementation omitted return null; } public static SkinVariant valueOf(String name) { // implementation omitted return null; } } ``` -------------------------------- ### Apply Skin to Player (SkinsRestorer API) Source: https://jd.skinsrestorer.net/index-all Provides methods to apply skins to players. These methods can apply a skin directly, from an identifier, or from raw skin properties. Dependencies include the SkinApplier interface. ```java applySkin(P player) applySkin(P player, SkinIdentifier skinIdentifier) applySkin(P player, SkinProperty skinProperty) ``` -------------------------------- ### MojangProfileTextureMeta Constructor - Java Source: https://jd.skinsrestorer.net/net/skinsrestorer/api/model/MojangProfileTextureMeta Defines the default constructor for the MojangProfileTextureMeta class. It initializes a new instance of the class. ```java public MojangProfileTextureMeta() ``` -------------------------------- ### SkinStorage - Get Player Skin Source: https://jd.skinsrestorer.net/index-all Retrieves cached skin data for a player by name. ```APIDOC ## SkinStorage - Get Player Skin ### Description Retrieves the skin data for a player by their name, utilizing the UUID cache. This method is part of the SkinStorage interface. ### Method `getPlayerSkin(String playerName, boolean fetchIfNull)` ### Endpoint (Not applicable - This is a method call on the SkinStorage instance) ### Parameters - **playerName** (String) - Required - The name of the player. - **fetchIfNull** (boolean) - Required - Whether to fetch from Mojang if the skin data is not found in the cache. ### Request Example (Not applicable) ### Response - **SkinProperty**: An object containing the skin's value and signature, or null if not found. ### Response Example ```json { "name": "textures", "value": "eyJ0ZXh0dXJlcy...", "signature": "..." } ``` ``` -------------------------------- ### Create SkinIdentifier from URL (Java) Source: https://jd.skinsrestorer.net/index-all Creates a SkinIdentifier for a skin hosted at a web URL. This is useful for applying skins from external sources. Requires specifying the SkinVariant. ```java /** * Create a new SkinIdentifier for a web URL. * @param url The URL of the skin image. * @param variant The variant of the skin (e.g., CLASSIC, SLIM). * @return A SkinIdentifier representing the URL. */ public static SkinIdentifier ofURL(String url, SkinVariant variant) ```