notdelta_.

create this file into plugin for all version

πŸ“Ž 1 file 3,179 chars
πŸ“„
profile.yml
yml 132 lines
β–Ά
# More Support: https://discord.gg/w5JjYgaU9q
# Made By: Kaiz
menu_title: '&0β˜… Player Profile'
register_command: true
update_interval: 1
size: 36
open_command:
  - profile
  - stats
items:

  'filler':
    material: GRAY_STAINED_GLASS_PANE
    display_name: "&0"
    slots: [0-36]
  
  'Playtime':
    material: CLOCK
    priority: 1
    slot: 24
    update: true
    hide_attributes:  true
    display_name: 'AB5FF%player_name%’s Playtime'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fHow much ab5ffPlaytime &fyou have?' 
      - '' 
      - 'ab5ff● &fPlaytime: AB5FF%statistic_hours_played%h %statistic_time_played:minutes%m %statistic_time_played:seconds%s'
  'Deaths':
    material: SKELETON_SKULL
    priority: 1
    slot: 23
    update: true
    hide_attributes:  true
    display_name: '&#FFA042%player_name%’s Deaths'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:' 
      - '&fHow much &#ffa042Death &fyou have?' 
      - ''
      - '&#ffa042● &fDeaths: &#FFA042%statistic_deaths%'
  'Kills':
    material: NETHERITE_SWORD
    priority: 1
    slot: 22
    update: true
    hide_attributes:  true
    display_name: '&#FF4343%player_name%’s Kills'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fHow much &#ff4343Kills &fyou have?' 
      - '' 
      - '&#ff4343● &fKills: &#FF4343%statistic_player_kills%'
  'Money':
    material: EMERALD
    priority: 1
    slot: 14
    update: true
    hide_attributes:  true
    display_name: '.FF43%player_name%’s Money'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fHow much .ff43Money &fyou have?' 
      - '' 
      - '.ff43● &fMoney: .FF43$%vault_eco_balance_formatted%'
  'Credits':
    material: SUNFLOWER
    priority: 1
    slot: 20
    update: true
    hide_attributes:  true
    display_name: '&#FFCE62%player_name%’s Coins'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fHow much &#ffce62Coins &fyou have?' 
      - '' 
      - '&#ffce60● &fCoins: &#FFCE62%coinsengine_balance_clean_coins%'
  
  'Rank':
    material: BELL
    priority: 1
    slot: 12
    update: true
    hide_attributes:  true
    display_name: '&#ffd400%player_name%’s Rank'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fWhich &#ffd400Rank &fyou have?' 
      - '' 
      - '&#ffd400● &fRank: &r%vault_prefix%'
  'shards':
    material: AMETHYST_SHARD
    priority: 1
    slot: 21
    update: true
    hide_attributes:  true
    display_name: '&#ff54b1%player_name%’s Shards'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fHow much &#ff54b1Shards &fyou have?' 
      - '' 
      - '&#ff54b1● &fShards: &#ff54b1%coinsengine_balance_raw_shards%'
      
  'hearts':
    material: RED_DYE
    priority: 1
    slot: 13
    update: true
    hide_attributes:  true
    display_name: '&#ff0000%player_name%’s Heart`s'
    lore:
      - '&8Statistic'
      - ''
      - '&6Information:'
      - '&fHow much &#ff0000Hearts &fyou have?' 
      - '' 
      - '&#ff0000● &fHearts: &#FF0000%lifesteal_hearts%'
 
# Made By: Kaiz
Kodari AI
KodariApr 4 at 1:25 pm
PlayerProfile
A fully configurable player profile GUI plugin that displays stats like kills, deaths, playtime, money, coins, shards, hearts, and rank in a chest inventory. Supports hex color codes, PlaceholderAPI integration, Vault economy, auto-refreshing items, configurable commands, materials, slots, and priorities. Built with a reusable GUI framework compatible with all Spigot/Paper versions from 1.8 to 1.21+.
  • GUI framework from docs + ProfileGUI implementation reading all items from profile.yml

  • Hex color util (&#RRGGBB), PlaceholderAPI soft-depend, Vault soft-depend, XMaterial + XItemFlag for cross-version

  • Auto-update task refreshes open GUIs every update_interval seconds; priority-sorted item rendering handles filler + stat overlapping

Done. The plugin creates a fully config-driven player profile GUI reading all items, slots, priorities, materials, hex colors, PlaceholderAPI placeholders, and hide-attributes flags from profile.yml. An auto-refresh task updates update: true items every update_interval seconds

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
14 742
src/main/java/com/kaiz/playerprofile/PlayerProfilePlugin.java
package com.kaiz.playerprofile;

import com.kaiz.playerprofile.commands.ProfileCommand;
import com.kaiz.playerprofile.inventory.InventoryGUI;
import com.kaiz.playerprofile.inventory.gui.GUIListener;
import com.kaiz.playerprofile.inventory.gui.GUIManager;
import com.kaiz.playerprofile.inventory.impl.ProfileGUI;
import com.kaiz.playerprofile.managers.ConfigManager;
import lombok.Getter;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

import java.util.Map;
import java.util.UUID;

@Getter
public class PlayerProfilePlugin extends JavaPlugin {

    private GUIManager guiManager;
    private ConfigManager configManager;

    @Override
    public void onEnable() {
        configManager = new ConfigManager(this);
        guiManager = new GUIManager();

        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);

        ProfileCommand profileCommand = new ProfileCommand(this);
        if (getCommand("profile") != null) {
            getCommand("profile").setExecutor(profileCommand);
        }

        startUpdateTask();
        getLogger().info("PlayerProfile enabled.");
    }

    @Override
    public void onDisable() {
        getLogger().info("PlayerProfile disabled.");
    }

    private void startUpdateTask() {
        long intervalTicks = configManager.getUpdateInterval() * 20L;
        new BukkitRunnable() {
            @Override
            public void run() {
                Map<UUID, InventoryGUI> openGUIs = guiManager.getPlayerGUIs();
                for (Map.Entry<UUID, InventoryGUI> entry : openGUIs.entrySet()) {
                    Player player = getServer().getPlayer(entry.getKey());
                    if (player != null && player.isOnline() && entry.getValue() instanceof ProfileGUI) {
                        ProfileGUI gui = (ProfileGUI) entry.getValue();
                        gui.refresh(player);
                    }
                }
            }
        }.runTaskTimer(this, intervalTicks, intervalTicks);
    }
}