Problem
After a home exists, the only way to change its icon is the management menu's Set icon to held item, which reads player.getInventory().getItemInMainHand() (HomeActionsGui, ACTION_ICON). If the player does not own the item they want, or is in creative and would rather not fetch it, they are stuck. /sethome <name> <icon> accepts any material name at creation time, so the two paths are inconsistent: any item is fine on the way in, but afterwards you must physically hold it.
Proposed
Two additions, both keeping the current held-item button as the fast path:
- A command form:
/set-home-icon <home> <material> (or an icon sub-form of an existing command, decide during design), with the same material validation create-home applies (Material.matchMaterial, must be isItem()), and tab completion of materials through the shared TabCompletions helper.
- An item picker in the management menu: a paginated GUI of items, opened from a second button next to Set icon to held item, that sets the icon on click. Search or filtering by typing is out of scope for a first pass; pages plus the existing prefix and substring tab completion on the command cover the "I know the name" case.
If only one is done first, do the command; the GUI picker can follow.
Design questions
- Which item set does the picker show: every
Material.isItem(), or a curated list (blocks first, then tools, then misc)? Every item is over 1300 entries, which is 30 pages of 45; that is usable with tab completion on the command but heavy in a GUI.
- Should the picker reuse
HomesGui's pagination or share a generic paged-inventory base? Worth extracting if it is the second consumer.
- Config keys for the new button (item and name), following the existing
setIconButtonItem / setIconButtonName pattern.
Acceptance criteria
Notes
Related to #37 (default icon variants), which is about the icon chosen when the player picks none; this issue is about choosing one deliberately after the fact.
Problem
After a home exists, the only way to change its icon is the management menu's Set icon to held item, which reads
player.getInventory().getItemInMainHand()(HomeActionsGui,ACTION_ICON). If the player does not own the item they want, or is in creative and would rather not fetch it, they are stuck./sethome <name> <icon>accepts any material name at creation time, so the two paths are inconsistent: any item is fine on the way in, but afterwards you must physically hold it.Proposed
Two additions, both keeping the current held-item button as the fast path:
/set-home-icon <home> <material>(or aniconsub-form of an existing command, decide during design), with the same material validationcreate-homeapplies (Material.matchMaterial, must beisItem()), and tab completion of materials through the sharedTabCompletionshelper.If only one is done first, do the command; the GUI picker can follow.
Design questions
Material.isItem(), or a curated list (blocks first, then tools, then misc)? Every item is over 1300 entries, which is 30 pages of 45; that is usable with tab completion on the command but heavy in a GUI.HomesGui's pagination or share a generic paged-inventory base? Worth extracting if it is the second consumer.setIconButtonItem/setIconButtonNamepattern.Acceptance criteria
invalidHomeItemmessage.TabCompletions.matching.sh2.manage-homes(no new node) unless design decides otherwise; admins acting on another player's home are out of scope.HomeActionsGui.Notes
Related to #37 (default icon variants), which is about the icon chosen when the player picks none; this issue is about choosing one deliberately after the fact.