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
I’ll build a purchase announcement plugin with player head pixel art in chat.
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
📄
pasted-code-1783619764561.txt
txt
79 lines
▶
donate-vip:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought <#EEFF7E>VIP #EEFF7E>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>They've unlocked even more exclusive perks and rewards!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-vip+:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought <#FFB347>VIP+ #FFB347>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>They've unlocked even more exclusive perks and rewards!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-mvp:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought <#55AAFF>MVP #55AAFF>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>They've unlocked even more exclusive perks and rewards!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-mvp+:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought <#00FFFF>MVP+ #00FFFF>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>They've unlocked even more exclusive perks and rewards!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-bro:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought <#FF3333>BRO #FF3333>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>They've unlocked even more exclusive perks and rewards!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-brokey:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought a <#FF5555>BRO Crate Key #FF5555>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>Good luck opening your crate!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-suffixkey:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> bought a <#AA55FF>Suffix Crate Key #AA55FF>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>Unlock awesome new chat suffixes!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
donate-mines:
use-prefix: false
head: true
lines:
- " "
- "<#00E0FF> #00E0FF> purchased <#55FF55>Private Mines #55FF55>! "
- "Thanks for supporting the server ♥ "
- "<#FFD700>Your private mining adventure awaits!#FFD700>"
- "<#55FF55>Visit brokits.paynow.store to support BROKITS too!#55FF55>"
Add the supplied per-product layouts and MiniMessage colors to the configuration.
Make the store-triggered purchase command broadcast the configured announcement to every online player.
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}placeholdersPermission-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:
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:
/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.
use normal hex colors for the color codes for plugin cuz the blold this what ever aint working
The announcements now use legacy formatting: &#RRGGBB for hex colors and &l for bold, with no MiniMessage tags.
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;
}
}