Skip to content

Lightweight and easy-to-use SkinChangerAPI for Bukkit/Spigot plugins.

Notifications You must be signed in to change notification settings

mecperspicace/SkinChangerAPI

Repository files navigation

SkinChangerAPI


Lightweight and easy-to-use SkinChangerAPI for Bukkit plugins.

Features

  • Support all the Bukkit version (1.7-1.18)
  • Easy to use
  • Support custom skin's textures
  • No dependencies needed
  • Less than 250 lines of code

Usages

Change player's skin

The function for change the player's skin is SkinChangerAPI.change(Player player, Property textures) :

@EventHandler
public void OnJoin(PlayerJoinEvent event) {
    SkinChangerAPI.change(event.getPlayer(), new Property("textures", value, signature);
}

Getting player's skin

The have many way to get the player's skin textures, for get the player's skin textures you can use 3 way : getByUUID(), getByName(), getByObject()

By UUID :

@EventHandler
public void OnJoin(PlayerJoinEvent event) {
    SkinChangerAPI.change(event.getPlayer(), SkinChangerAPI.getByUUID(event.getPlayer.getUniqueID()));
}

By Name:

@EventHandler
public void OnJoin(PlayerJoinEvent event) {
    SkinChangerAPI.change(event.getPlayer(), SkinChangerAPI.getByName(event.getPlayer.getName()));
}

By Object:

@EventHandler
public void OnJoin(PlayerJoinEvent event) {
    SkinChangerAPI.change(event.getPlayer(), SkinChangerAPI.getByObject(event.getPlayer()));
}

By File:

// Soon