Head Items Data
If you want to create a GUI that displays player heads based on real-time server data, you can use one of the Head Items Data entries. These entries generate items dynamically based on current player information, making them perfect for social features, player lists, or interactive multiplayer elements.
Depending on what you want to achieve, you can use one of the following entries:
1. Player Heads Items Data Entry
Section titled โ1. Player Heads Items Data EntryโThis entry displays the heads of all currently online players as items in the GUI. The heads are generated dynamically based on who is online at the moment the GUI is opened, making it perfect for displaying active player lists.
Key Features:
- โก Dynamic Generation: Updates automatically based on current online players
- ๐ฅ Real-time Data: Shows only players who are currently connected to the server
- ๐ Auto-scaling: Fills slots in order until all online players are displayed or slots run out
- ๐จ Customizable: Apply reference item properties to all generated heads
2. Player Self Head Items Data Entry
Section titled โ2. Player Self Head Items Data EntryโThis entry displays the current playerโs own head in the specified slots. Unlike the online players variant, this shows only the head of the player who opened the GUI.
Key Features:
- ๐ค Personal: Shows only the current playerโs head
- ๐ง Simple Setup: Easy to configure for personal profile sections
- ๐จ Customizable: Apply reference item properties to the generated head
- ๐ Fixed Placement: Appears in all specified slots with the same head
Key Differences
Section titled โKey DifferencesโHereโs a breakdown of the features in a table format:
๐ View Feature Comparison Table
Head Items Data Entry Comparison
Choose the approach that best fits your project needs
Real-time Dynamic Behavior
Section titled โReal-time Dynamic BehaviorโBoth entries generate their content dynamically when the GUI is opened:
- Player Heads: If 5 players are online, you get 5 different heads. If 20 players are online, you get up to 20 heads (limited by available slots).
- Player Self Head: Always shows the same playerโs head, regardless of server population.
This means the GUI content changes automatically based on current server conditions without any additional configuration!
How to Use
Section titled โHow to UseโTo use the Head Items Data entries, follow these steps:
-
Create a GUI: Start by creating a new GUI Definition using the GUI-Utilities framework or use an existing definition if you already have one.
-
Add a Head Items Data Entry: In the GUI Definition, add either the Player Heads or Player Self Head Items Data entry.
-
Configure the Entry:
- Reference Item (Optional): Set item properties that will be applied to all generated heads (name, lore, enchantments, etc.)
- Slots: Define which GUI slots should display the heads
-
Set up Slots:
- For Player Heads: List slots in the order you want them filled (e.g.,
[10, 11, 12, 13, 14]
) - For Player Self Head: List all slots where you want the playerโs head to appear
- For Player Heads: List slots in the order you want them filled (e.g.,
-
Test the GUI: Open the GUI in Minecraft to see the heads displayed dynamically based on current server data.
Example Use Cases
Section titled โExample Use CasesโPlayer Heads (Online Players):
- Server member list GUI
- Party or team selection interface
- Social hub with active players
- Multiplayer game lobbies
- Player leaderboard displays
Player Self Head:
- Personal profile sections
- Player statistics displays
- Inventory or ender chest type GUIs
- Achievement or progression menus
Upcoming Features
Section titled โUpcoming Featuresโ- Click Actions(Click to teleport to players, send messages, etc.)
- Dynamic updates without GUI reloads
- Show extra player data (rank, online time, stats, etc.)