Delevoper API

JOgtGc6.png

  • How to send my player skin with a custom message? Simple just copy and paste this:
public DeluxeAnnounce api = new DeluxeAnnounce();

api.sendAvatar(player, getConfig().getStringList("AVATAR"), AvatarType.PREMIUM);
  • Example of how the class would look like:
public class STNMain extends JavaPlugin implements Listener {

@Override
    public void onEnable() {
        saveDefaultConfig();
        if (Bukkit.getPluginManager().isPluginEnabled("DeluxeAnnounce")) {
            getServer().getPluginManager().registerEvents(this, this);
        }
    }

@EventHandler
    public void sendAvatar(PlayerJoinEvent event) {
        DeluxeAnnounce api = new DeluxeAnnounce();
        Player player = event.getPlayer();

// AvatarType.PREMIUM -> You can use this type and it will only send the player's premium skins.
        // AvatarType.CRACKED -> You can use this one if you have a non-premium server and it will use the SkinsRestorer API.
        // AvatarType.NORMAL -> Send a normal message without avatar.

// Being able to send normal messages with PlaceholderAPI placeholders
        api.sendAvatar(player, getConfig().getStringList("AVATAR"), AvatarType.PREMIUM);

// Add more custom placeholders
        List<String> list = plugin.getConfig().getStringList("AVATAR");
        list.replaceAll(s -> s
                .replace("{Text}", "Custom placeholder!")
                .replace("{Text Two}", "Custom placeholder two!"));
        api.sendAvatar(player, list, AvatarType.PREMIUM);
    }
}
  • Config.yml
AVATAR:
  - '<center>&9&lSTN &f&lSTUDIOS&e®</center>'
  - ''
  - '&f     #B9FF00 SUPPORT #C63000 WITH #00C69F HEX #C6008D COLORS'
  - ''
  - '<center>&7PlaceholderAPI support</center>'
  - ' &b❑ &fPlayer: &a%player_name%'
  - ' &b❑ &fUptime: &a%server_uptime%'
  - ' &b❑ &fPlayer IP: &a%player_ip%'
  • As shown in the chat:

lCiLpKn.png