Use website branding and protect players while menus are open

This commit is contained in:
unimatrixgit 2026-11-28 01:17:47 +01:00
commit 13df172a7e

View file

@ -20,7 +20,7 @@ final class ExchangeMenus implements Listener,AutoCloseable {
private final Map<UUID,Purchase> retries=new HashMap<>();
private record Draft(ItemStack item,int slot,int amount,long price){Draft quantity(int n){return new Draft(item,slot,n,price);}Draft price(long n){return new Draft(item,slot,amount,n);}}
private record Purchase(JsonObject row,int amount,UUID request){Purchase quantity(int n){return new Purchase(row,n,UUID.randomUUID());}}
private static final class Panel implements InventoryHolder {
private static final class Panel implements DuneMenuInventory {
final UUID owner,world;final GuiSession gate;final Map<Integer,Runnable> actions=new HashMap<>();final List<BedrockForms.Choice> choices=new ArrayList<>();final Inventory inventory;final String title;final boolean artwork;String description="Central bank · J.A.R.V.I.S. Exchange";
Panel(Player p,String title,boolean artwork,int screen){owner=p.getUniqueId();world=p.getWorld().getUID();gate=new GuiSession(owner);this.title=title;this.artwork=artwork;inventory=Bukkit.createInventory(this,54,artwork?Component.text(ExchangeArtwork.background(screen),NamedTextColor.WHITE).font(net.kyori.adventure.key.Key.key("dunerealms:exchange")):Component.text(title,NamedTextColor.GOLD));}
public Inventory getInventory(){return inventory;}