Developer Guides
SkinsRestorer API

SkinsRestorer API

SkinsRestorer has a public API that can be used by other plugins to interact with SkinsRestorer.


Please note that this API is still work-in-progress. Expect breaking changes!


You can find useful resources to the SkinsRestorer API below:

Add to your build file

Here is an example of how to add the API to your build file. Select your build tool below.

Latest Version (Without the v): Latest Version

Add the following repository and dependency to your pom.xml file:

    <!-- SkinsRestorer API -->

Add SkinsRestorer as a dependency

If you want to use the API in your plugin, you will need to add SkinsRestorer as a dependency of your plugin. This is used, so SkinsRestorer is loaded BEFORE your plugin, so you can use the API in your onEnable() method. In the example below, we will use a soft dependency, so your plugin will still work if SkinsRestorer is not installed, but to use the API, SkinsRestorer will need to be installed. Errors will be thrown if SkinsRestorer is not installed, but you use the API. The process below may vary depending on your build configuration. (E.g., you have a build plugin that generates plugin configs)

Add the following dependency to your plugin.yml file:

softdepend: [ "SkinsRestorer" ]

When using BungeeCord/Velocity?

If you are using BungeeCord/Velocity, you must have a plugin that calls the API on BungeeCord/Velocity. You would need to use in/out put channels to send this information across both of your custom plugins.

Getting issues?

  • Make sure to import all your classes if you see the message "Cannot find symbol" or "Cannot resolve symbol"
  • Make sure to get the API using skinsRestorer = SkinsRestorerProvider.get() and you have the field private SkinsRestorer skinsRestorer; at the start of your class.
  • Make sure to add the dependency to your build file as described above.
  • Make sure to add the dependency to your plugin.yml as described above.
  • Make sure SkinsRestorer is not in "Proxy Mode" if you are using BungeeCord/Velocity.