xpertx2

make a plugin for when someone purchases something it wont automatically but the store will send the command but i want to be able to make it like a players head in chat 8x8 blocks in chat for showing the player that bought it and then write to the rigth side of the message or the players head to each rank in my sotre or product them buy i can edit it make it configurable or From the store it can work

Kodari AI
KodariJul 9 at 4:37 pm 1
PurchaseDisplay
A purchase announcement plugin that renders player heads as 8x8 pixel art in chat. When a store triggers the command, it displays the buyer's face as colored blocks alongside configurable text showing the product and rank purchased. Features customizable messages per product, configurable layout, and automatic skin fetching from Mojang API.

I’ll build a purchase announcement plugin with player head pixel art in chat.

xpertx2

here are the layout and colors i want, and also make it when someone purchase it broadcasts to everyone sayng thta this player bought it for the cirtain item

📎 1 file 3,717 chars
📄
pasted-code-1783619764561.txt
txt 79 lines
▶
    donate-vip:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought <#EEFF7E>VIP!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>They've unlocked even more exclusive perks and rewards!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-vip+:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought <#FFB347>VIP+!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>They've unlocked even more exclusive perks and rewards!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-mvp:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought <#55AAFF>MVP!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>They've unlocked even more exclusive perks and rewards!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-mvp+:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought <#00FFFF>MVP+!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>They've unlocked even more exclusive perks and rewards!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-bro:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought <#FF3333>BRO!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>They've unlocked even more exclusive perks and rewards!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-brokey:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought a <#FF5555>BRO Crate Key!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>Good luck opening your crate!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-suffixkey:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> bought a <#AA55FF>Suffix Crate Key!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>Unlock awesome new chat suffixes!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"

    donate-mines:
      use-prefix: false
      head: true
      lines:
        - " "
        - "<#00E0FF> purchased <#55FF55>Private Mines!"
        - "Thanks for supporting the server ♥"
        - "<#FFD700>Your private mining adventure awaits!"
        - "<#55FF55>Visit brokits.paynow.store to support BROKITS too!"    
Kodari AI
KodariJul 9 at 5:57 pm 9
  1. Add the supplied per-product layouts and MiniMessage colors to the configuration.

  2. Make the store-triggered purchase command broadcast the configured announcement to every online player.

  3. Support player-name replacement and the optional player-head display while preserving reload/editability.

למ

The purchase announcement already broadcasts to all online players and supports:

  • 8×8 player-head pixel art

  • Configurable text to the right of the head

  • Product-specific layouts

  • {player}, {product}, and {rank} placeholders

  • Permission-based or all-player broadcasting

  • Reloading with /purchasedisplay-reload

Your supplied layouts should be added under products: in src/main/resources/config.yml. Use this structure:

YAML
products:
  donate-vip:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought</white> <#EEFF7E><bold>VIP</bold></#EEFF7E><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>They've unlocked even more exclusive perks and rewards!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-vip+:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought</white> <#FFB347><bold>VIP+</bold></#FFB347><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>They've unlocked even more exclusive perks and rewards!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-mvp:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought</white> <#55AAFF><bold>MVP</bold></#55AAFF><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>They've unlocked even more exclusive perks and rewards!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-mvp+:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought</white> <#00FFFF><bold>MVP+</bold></#00FFFF><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>They've unlocked even more exclusive perks and rewards!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-bro:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought</white> <#FF3333><bold>BRO</bold></#FF3333><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>They've unlocked even more exclusive perks and rewards!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-brokey:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought a</white> <#FF5555><bold>BRO Crate Key</bold></#FF5555><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>Good luck opening your crate!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-suffixkey:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>bought a</white> <#AA55FF><bold>Suffix Crate Key</bold></#AA55FF><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>Unlock awesome new chat suffixes!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

  donate-mines:
    use-prefix: false
    head: true
    lines:
      - " "
      - "<#00E0FF><bold><player></bold></#00E0FF> <white>purchased</white> <#55FF55><bold>Private Mines</bold></#55FF55><white>!</white>"
      - "<gray>Thanks for supporting the server ♥</gray>"
      - "<#FFD700>Your private mining adventure awaits!</#FFD700>"
      - "<#55FF55>Visit <white>brokits.paynow.store</white> to support BROKITS too!</#55FF55>"

Use store commands such as:

Plain Text
/purchasedisplay Steve donate-vip
/purchasedisplay Steve donate-mvp+
/purchasedisplay Steve donate-brokey

One important limitation remains: the current Java code translates only legacy & colors. The <#00E0FF>, <bold>, and other MiniMessage-style tags will not display correctly until the chat renderer is changed to Adventure/MiniMessage formatting.

xpertx2

use normal hex colors for the color codes for plugin cuz the blold this what ever aint working

Kodari AI
KodariJul 9 at 6:01 pm 17

The announcements now use legacy formatting: &#RRGGBB for hex colors and &l for bold, with no MiniMessage tags.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 634
src/main/java/com/purchasedisplay/PurchaseDisplay.java
package com.purchasedisplay;

import org.bukkit.plugin.java.JavaPlugin;

public class PurchaseDisplay extends JavaPlugin {

    private static PurchaseDisplay instance;
    private HeadRenderer headRenderer;
    private ChatDisplayer chatDisplayer;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();
        reloadConfig();

        headRenderer = new HeadRenderer(this);
        chatDisplayer = new ChatDisplayer(this);

        getCommand("purchasedisplay").setExecutor(new PurchaseCommand(this));
        getCommand("purchasedisplay-reload").setExecutor(new ReloadCommand(this));

        getLogger().info("PurchaseDisplay enabled!");
    }

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

    public static PurchaseDisplay getInstance() {
        return instance;
    }

    public HeadRenderer getHeadRenderer() {
        return headRenderer;
    }

    public ChatDisplayer getChatDisplayer() {
        return chatDisplayer;
    }
}