- Keep text inside measured card bounds. Essential price and stock remain visible before purchase; optional details must not execute or confirm a purchase.
- Use verified item artwork from actual item metadata. Same-ID block textures are flat surface previews, not native 3D renders. Unsupported complex/dynamic icons require an explicit fallback; never infer quality or MK from a title.
- Use the canonical illustrated website logo with proportional containment. Package/cache artwork locally and keep remote requests out of menu opening.
- Owner approved compact card density across Java menus: standard cards approximately 25% smaller, Exchange navigation as a toolbar, and mission cards in a grid. Preserve readable prices and click targets.
Owner connected-client feedback requested cards approximately 25% smaller across all Java full-screen menus, compact Exchange navigation and one unambiguous working sell action.
Menus 2.0.3 reduces standard card width from 22.5% to 16.875% and height from 186 to 140 CSS pixels, with smaller framed centred icons, padding and readable text. Mission/war journals use a compact grid rather than full-width rows. Council, bank and travel families retain their distinct layouts with reduced dimensions. Full text remains accessible through Details; price and stock stay first in summaries.
Exchange navigation uses small toolbar controls. The misleading Sell navigation label is now My listings, preserving existing listing withdrawal/management. Add held item is the sole Sell item action and invokes the original working draft callback. No payment, JARVIS or retry semantics change. Empty own-listing results explicitly say No own listings and direct the player to Sell item.
GUI version 1.1.37; actual plugin descriptor must agree. Pack content and backend JARs remain unchanged. Local renderer verification covers 15 families and 152 action hitboxes, text containment, centred icons, 28 long listings, Details and toolbar controls. Synthetic previews are not connected-client acceptance. Exact canonical CI and guarded rollout are required before live claims.
Blocked claim-expansion buttons now report the same existing capacity/home/permission reason and reopen the claims view, rather than silently closing. No guard, entitlement, deed or claim record is bypassed. The specific Arrakis report (North worked, All did not) still requires actual estate/capacity evidence before attributing it to a backend fault.
for(varelement:listingPage.document.select("[data-slot='1013']")){varbounds=listingFrame.boundsOf(element);varat=listingFrame.elementAt(bounds.getCenterX(),bounds.getCenterY());if(at==null||!at.closest("[data-slot]").attr("data-slot").equals("1013"))thrownewAssertionError("Detail control hitbox");}
for(varelement:listingPage.document.select(".market-tool,[data-slot='1013']")){varbounds=listingFrame.boundsOf(element);varat=listingFrame.elementAt(bounds.getCenterX(),bounds.getCenterY());if(at==null||!at.closest("[data-slot]").attr("data-slot").equals(element.attr("data-slot")))thrownewAssertionError("Detail control hitbox");}
System.out.println("PASS: "+checked+" direct action hitboxes across15 menu families.");
varsell=newCard(49,"Sell item",List.of("List the item in your main hand"),"hopper");varmine=newCard(7,"My listings",List.of("Manage existing listings"),"chest");varitem=newCard(13,"Real item",List.of("100 DM"),"iron_sword");
privatevoidlist(Playerp,booleanmine,intpage){varq=action("read");q.addProperty("mine",mine);q.addProperty("page",page);request(p,q,data->{vars=panel(p,mine?"Exchange · Your listings":"Exchange · Buy");button(s,1,Material.EMERALD,"Buy","Browse all available items",()->list(p,false,0));button(s,4,Material.NETHERITE_CHESTPLATE,"Kits","Published organisation stillsuit kits",()->kits(p,0));button(s,7,Material.CHEST,"Sell","Your listings and add held item",()->list(p,true,0));intindex=0;for(varvalue:data.getAsJsonArray("listings")){varrow=value.getAsJsonObject();intslot=10+(index/6)*9+index%6;index++;try{varitem=bridge.exchangeIcon(row);varmeta=item.getItemMeta();List<Component>lore=newArrayList<>(meta.hasLore()?meta.lore():List.of());lore.add(Component.text(""));lore.add(Component.text("Seller: "+row.get("seller").getAsString(),NamedTextColor.GRAY));lore.add(Component.text(row.get("quantity").getAsInt()+" available · "+money(row.get("priceMinor").getAsLong())+" each",NamedTextColor.GOLD));meta.lore(lore);item.setItemMeta(meta);s.inventory.setItem(slot,item);Runnablepick=()->{if(row.get("sellerUuid").getAsString().equals(p.getUniqueId().toString()))withdraw(p,row);elsepurchase(p,newPurchase(row,1,UUID.randomUUID()));};s.actions.put(slot,pick);s.choices.add(newBedrockForms.Choice(row.get("title").getAsString(),money(row.get("priceMinor").getAsLong())+" · "+row.get("quantity").getAsInt()+" available",pick));}catch(Exceptionunsupported){s.inventory.setItem(slot,icon(Material.BARRIER,"Unsupported item","This version cannot display the stored item."));}}
if(index==0)s.inventory.setItem(22,icon(Material.PAPER,"No listings",mine?"Hold an item and choose Add held item.":"Check again after players publish goods."));
if(page>0)button(s,45,Material.ARROW,"Previous","Page "+page,()->list(p,mine,page-1));if(data.get("hasNext").getAsBoolean())button(s,53,Material.ARROW,"Next","More listings",()->list(p,mine,page+1));button(s,48,Material.BOOK,"Imperial Codex","Return to your services",()->back.accept(p));button(s,49,Material.HOPPER,"Add held item","List an item from your main hand",()->draft(p));button(s,50,Material.CHEST_MINECART,"Collect purchases","Deliver paid items waiting for inventory space",()->{deliver(p,true);list(p,mine,page);});show(p,s);
privatevoidlist(Playerp,booleanmine,intpage){varq=action("read");q.addProperty("mine",mine);q.addProperty("page",page);request(p,q,data->{vars=panel(p,mine?"Exchange · Your listings":"Exchange · Buy");button(s,1,Material.EMERALD,"Buy","Browse all available items",()->list(p,false,0));button(s,4,Material.NETHERITE_CHESTPLATE,"Kits","Published organisation stillsuit kits",()->kits(p,0));button(s,7,Material.CHEST,"My listings","Manage your existing listings",()->list(p,true,0));intindex=0;for(varvalue:data.getAsJsonArray("listings")){varrow=value.getAsJsonObject();intslot=10+(index/6)*9+index%6;index++;try{varitem=bridge.exchangeIcon(row);varmeta=item.getItemMeta();List<Component>lore=newArrayList<>(meta.hasLore()?meta.lore():List.of());lore.add(Component.text(""));lore.add(Component.text("Seller: "+row.get("seller").getAsString(),NamedTextColor.GRAY));lore.add(Component.text(row.get("quantity").getAsInt()+" available · "+money(row.get("priceMinor").getAsLong())+" each",NamedTextColor.GOLD));meta.lore(lore);item.setItemMeta(meta);s.inventory.setItem(slot,item);Runnablepick=()->{if(row.get("sellerUuid").getAsString().equals(p.getUniqueId().toString()))withdraw(p,row);elsepurchase(p,newPurchase(row,1,UUID.randomUUID()));};s.actions.put(slot,pick);s.choices.add(newBedrockForms.Choice(row.get("title").getAsString(),money(row.get("priceMinor").getAsLong())+" · "+row.get("quantity").getAsInt()+" available",pick));}catch(Exceptionunsupported){s.inventory.setItem(slot,icon(Material.BARRIER,"Unsupported item","This version cannot display the stored item."));}}
if(index==0)s.inventory.setItem(22,icon(Material.PAPER,"No listings",mine?"No own listings. Hold an item and choose Sell item.":"Check again after players publish goods."));
if(page>0)button(s,45,Material.ARROW,"Previous","Page "+page,()->list(p,mine,page-1));if(data.get("hasNext").getAsBoolean())button(s,53,Material.ARROW,"Next","More listings",()->list(p,mine,page+1));button(s,48,Material.BOOK,"Imperial Codex","Return to your services",()->back.accept(p));button(s,49,Material.HOPPER,"Sell item","List the item in your main hand",()->draft(p));button(s,50,Material.CHEST_MINECART,"Collect purchases","Deliver paid items waiting for inventory space",()->{deliver(p,true);list(p,mine,page);});show(p,s);
});}
privatevoiddraft(Playerp){varitem=p.getInventory().getItemInMainHand();if(item.isEmpty()){p.sendMessage("Hold the item you want to sell first.");return;}sell(p,newDraft(item.clone(),p.getInventory().getHeldItemSlot(),Math.min(64,item.getAmount()),100));}
privatevoidsell(Playerp,Draftdraft){vars=panel(p,"Exchange · Add item");s.description=draft.item.getType().name()+" · "+draft.amount+" items\n"+money(draft.price)+" per item\nTotal: "+money(draft.price*draft.amount);s.inventory.setItem(13,draft.item.clone());quantityPresets(s,Math.min(64,draft.item.getAmount()),amount->sell(p,draft.quantity(amount)));button(s,30,Material.RED_DYE,"− Quantity","Sell "+draft.amount+" items",()->sell(p,draft.quantity(Math.max(1,draft.amount-1))));button(s,31,Material.PAPER,"Quantity: "+draft.amount,"Maximum "+Math.min(64,draft.item.getAmount()),()->sell(p,draft));button(s,32,Material.LIME_DYE,"+ Quantity","Add one item",()->sell(p,draft.quantity(Math.min(Math.min(64,draft.item.getAmount()),draft.amount+1))));button(s,40,Material.GOLD_INGOT,"Price: "+money(draft.price),"Price per item · total "+money(draft.price*draft.amount),()->editPrice(p,draft));button(s,45,Material.ARROW,"Back","Return to your listings",()->list(p,true,0));button(s,49,Material.EMERALD,"Confirm listing","Move "+draft.amount+" items into the Exchange",()->{UUIDid=UUID.randomUUID();varq=action("prepare_sale");q.addProperty("requestId",id.toString());q.addProperty("amount",draft.amount);q.addProperty("priceMinor",draft.price);request(p,q,permit->{try{bridge.exchangePublish(p,permit,id,draft.item,draft.slot,draft.amount,draft.price);p.sendMessage("Listing published. Items are held by the Exchange until sold or withdrawn.");list(p,true,0);}catch(Exceptione){p.sendMessage(e.getMessage()==null?"The listing was not confirmed.":e.getMessage());}});});show(p,s);}
@ -71,7 +71,7 @@ final class ExchangeMenus implements Listener,AutoCloseable {
privatevoidpurchase(Playerp,Purchasepurchase){if(purchase.row.has("kitsetId")){kitPurchase(p,purchase);return;}varrow=purchase.row;vars=panel(p,"Exchange · Confirm purchase");s.description=row.get("title").getAsString()+"\nSeller: "+row.get("seller").getAsString()+"\nQuantity: "+purchase.amount+" · Total: "+money(row.get("priceMinor").getAsLong()*purchase.amount);try{s.inventory.setItem(13,bridge.exchangeIcon(row));}catch(Exceptionbad){p.sendMessage("This item cannot be delivered by your current version.");return;}quantityPresets(s,Math.min(64,row.get("quantity").getAsInt()),amount->purchase(p,retries.containsKey(p.getUniqueId())?purchase:purchase.quantity(amount)));button(s,30,Material.RED_DYE,"− Quantity","Buy "+purchase.amount,()->purchase(p,retries.containsKey(p.getUniqueId())?purchase:purchase.quantity(Math.max(1,purchase.amount-1))));button(s,31,Material.PAPER,"Quantity: "+purchase.amount,money(row.get("priceMinor").getAsLong())+" per item",()->purchase(p,purchase));button(s,32,Material.LIME_DYE,"+ Quantity","Maximum "+Math.min(64,row.get("quantity").getAsInt()),()->purchase(p,retries.containsKey(p.getUniqueId())?purchase:purchase.quantity(Math.min(Math.min(64,row.get("quantity").getAsInt()),purchase.amount+1))));button(s,45,Material.ARROW,"Back","Return to the Exchange",()->{if(retries.containsKey(p.getUniqueId())){p.sendMessage("Resolve the previous purchase by retrying the same confirmation first.");purchase(p,purchase);}elselist(p,false,0);});button(s,49,Material.EMERALD,(retries.containsKey(p.getUniqueId())?"Retry purchase · ":"Buy · ")+money(row.get("priceMinor").getAsLong()*purchase.amount),"Pay from your central personal bank account",()->{retries.put(p.getUniqueId(),purchase);varq=action("buy");q.addProperty("requestId",purchase.request.toString());q.addProperty("listingId",row.get("id").getAsString());q.addProperty("amount",purchase.amount);q.addProperty("priceMinor",row.get("priceMinor").getAsLong());q.addProperty("confirmed",true);request(p,q,receipt->{retries.remove(p.getUniqueId());p.sendMessage("Purchase confirmed: "+money(receipt.get("totalMinor").getAsLong())+". Your items are ready for delivery.");if(receipt.has("rebateMinor")&&receipt.get("rebateMinor").getAsLong()>0)p.sendMessage("Ordos trade incentive credited: "+money(receipt.get("rebateMinor").getAsLong())+".");deliver(p,true);list(p,false,0);},error->{p.sendMessage(error+" Retry this confirmation with the same purchase reference.");purchase(p,purchase);});});show(p,s);}
privatevoidkitPurchase(Playerp,Purchasepurchase){varrow=purchase.row;vars=panel(p,"Exchange · Confirm purchase");s.description=row.get("title").getAsString()+"\nOrganisation: "+row.get("seller").getAsString()+"\n"+row.get("items").getAsInt()+" items · "+money(row.get("priceMinor").getAsLong());s.inventory.setItem(13,icon(Material.NETHERITE_CHESTPLATE,row.get("title").getAsString(),row.get("seller").getAsString(),row.get("items").getAsInt()+" items"));button(s,45,Material.ARROW,"Back","Kit catalogue",()->{if(retries.containsKey(p.getUniqueId())){p.sendMessage("Resolve the previous purchase with the same reference first.");kitPurchase(p,purchase);}elsekits(p,0);});button(s,49,Material.EMERALD,(retries.containsKey(p.getUniqueId())?"Retry kit · ":"Buy kit · ")+money(row.get("priceMinor").getAsLong()),"Pay personally; proceeds go to the organisation",()->{retries.put(p.getUniqueId(),purchase);varq=action("buy_kit");q.addProperty("requestId",purchase.request.toString());q.addProperty("kitsetId",row.get("kitsetId").getAsString());q.add("listingVersion",row.get("listingVersion"));q.add("priceMinor",row.get("priceMinor"));q.addProperty("confirmed",true);request(p,q,receipt->{retries.remove(p.getUniqueId());p.sendMessage("Kit purchased: "+money(receipt.get("totalMinor").getAsLong())+". Delivery follows automatically; make room for the complete kit.");try{bridge.refreshKits(p);}catch(Exceptionunavailable){p.sendMessage("Your kit remains owed until the next inventory sync.");}kits(p,0);},error->{p.sendMessage(error+" Retry this confirmation with the same reference.");kitPurchase(p,purchase);});});show(p,s);}
privatevoidwithdraw(Playerp,JsonObjectrow){vars=panel(p,"Exchange · Withdraw listing");try{s.inventory.setItem(13,bridge.exchangeIcon(row));}catch(Exceptionbad){p.sendMessage("This stored item cannot be decoded.");return;}button(s,45,Material.ARROW,"Back","Your listings",()->list(p,true,0));button(s,49,Material.CHEST,"Withdraw "+row.get("quantity").getAsInt()+" items","Return all unsold stock to your inventory",()->{UUIDid=UUID.randomUUID();varq=action("prepare_cancel");q.addProperty("requestId",id.toString());request(p,q,permit->{try{intquantity=bridge.exchangeCancel(p,permit,id,Long.parseLong(row.get("id").getAsString()));p.sendMessage("Listing withdrawn. Returned "+quantity+" items.");list(p,true,0);}catch(Exceptione){p.sendMessage(e.getMessage()==null?"The listing was not withdrawn.":e.getMessage());}});});show(p,s);}
privatevoiddeliver(Playerp,booleanexplain){if(!p.isOnline()||!delivering.add(p.getUniqueId()))return;UUIDid=p.getUniqueId();varq=action("pending");Bukkit.getScheduler().runTaskAsynchronously(plugin,()->{JsonObjectresponse=null;try{response=bridge.exchange(id,q);}catch(Exceptionignored){}vardata=response;if(!plugin.isEnabled())return;Bukkit.getScheduler().runTask(plugin,()->{delivering.remove(id);if(!p.isOnline())return;if(data==null||!data.has("pending")){if(explain)p.sendMessage("Paid deliveries remain queued. Reopen the Exchange to try again.");return;}if(data.getAsJsonArray("pending").isEmpty()){if(explain)p.sendMessage("No paid items are waiting for delivery.");return;}try{intcount=bridge.exchangeDeliver(p);if(explain||count>0)p.sendMessage(count>0?"J.A.R.V.I.S. delivered "+count+" purchased items.":"Make inventory space. Your paid items remain queued.");}catch(Exceptionunavailable){if(explain)p.sendMessage("Paid items remain queued until your shared inventory is ready.");}});});}
put(screen,slots[i],"Expand "+direction,allowed?"Add "+addition+" adjacent chunks\nResult: "+next+" / "+capacity+"\nReview before applying":!manage?"Current organisation management required":!home?"Set your Home Block first":capacity==0?"Claim entitlement unavailable":"Needs "+next+" chunks; unlocked limit "+capacity,allowed?Material.LIME_DYE:Material.GRAY_DYE,()->{if(!allowed)return;varconfirm=panel(p,"Confirm claim expansion",!kind.equals("clans"));put(confirm,13,"Expand "+direction,"Add "+addition+" chunks around the current estate\nResult: "+next+" / "+capacity+" chunks\nExisting Home Block stays in place\nForeign claims and active wars are checked",Material.MAP,()->claims(p,data,kind,row));put(confirm,30,"Confirm expansion","Use unlocked capacity; no new tier purchase",Material.LIME_DYE,()->perform(p,kind,row,"expand-claim",direction));put(confirm,32,"Cancel","Leave the estate unchanged",Material.ARROW,()->claims(p,data,kind,row));show(p,confirm);});
for(inti=0;i<directions.length;i++){Stringdirection=directions[i];intaddition=additions[i],next=used+addition;booleanallowed=manage&&home&&capacity>0&&next<=capacity;Stringblocked=!manage?"Current organisation management required":!home?"Set your Home Block first":capacity==0?"Claim entitlement unavailable":"Needs "+next+" chunks; unlocked limit "+capacity;
put(screen,slots[i],"Expand "+direction,allowed?"Add "+addition+" adjacent chunks\nResult: "+next+" / "+capacity+"\nReview before applying":blocked,allowed?Material.LIME_DYE:Material.GRAY_DYE,()->{if(!allowed){p.sendMessage(blocked);claims(p,data,kind,row);return;}varconfirm=panel(p,"Confirm claim expansion",!kind.equals("clans"));put(confirm,13,"Expand "+direction,"Add "+addition+" chunks around the current estate\nResult: "+next+" / "+capacity+" chunks\nExisting Home Block stays in place\nForeign claims and active wars are checked",Material.MAP,()->claims(p,data,kind,row));put(confirm,30,"Confirm expansion","Use unlocked capacity; no new tier purchase",Material.LIME_DYE,()->perform(p,kind,row,"expand-claim",direction));put(confirm,32,"Cancel","Leave the estate unchanged",Material.ARROW,()->claims(p,data,kind,row));show(p,confirm);});