💀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.

Last updated