⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Methods
  • Example Usage
  1. StarAPI (Spigot/Paper)
  2. Misc

Give Skulls

Give a player a skull with a texture

Overview

The SkullUtils class provides utility methods for working with player skull items.

Methods

giveSkullToPlayer

public static void giveSkullToPlayer(Player player, String url, int amount, String itemName, String... lore)

Gives a player a skull item with the specified properties.

Parameters

  • player: The player to whom the skull item will be given.

  • url: The URL of the skin texture for the skull.

  • amount: The amount of skull items to give to the player.

  • itemName: The display name of the skull item.

  • lore: Optional lore lines for the skull item.

Example Usage

Player player = Bukkit.getPlayer("example_player");
String url = "example_texture_url";
int amount = 1;
String itemName = "Example Skull";
String[] lore = { "Line 1", "Line 2", "Line 3" };

SkullUtils.giveSkullToPlayer(player, url, amount, itemName, lore);

In this example, we use the giveSkullToPlayer method to give a player a skull item with a specific texture URL, amount, display name, and lore.

PreviousMiscNextProgress Bars

Last updated 1 year ago

🌟
📂
💀