Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/developers/modules/inventory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ Explore each integration by cycling through each tab, to find the best fit for y

**Copy To Clipboard Item**

`/summon item ~ ~1 ~ {Item:{id:"minecraft:paper",Count:1b,components:{"minecraft:custom_name":"COPY TO CLIPBOARD","minecraft:custom_data":{lunar:{unclickable:true,copyToClipboard:"lunarclient.com"}}}}}`
`/summon item ~ ~1 ~ {Item:{id:"minecraft:paper",Count:1b,components:{"minecraft:custom_name":"COPY TO CLIPBOARD","minecraft:custom_data":{lunar:{unclickable:true,copy_to_clipboard:"lunarclient.com"}}}}}`

**Open URL Item**

`/summon item ~ ~1 ~ {Item:{id:"minecraft:torch",Count:1b,components:{"minecraft:custom_name":"OPEN URL","minecraft:custom_data":{lunar:{unclickable:true,openUrl:"https://lunarclient.com"}}}}}`
`/summon item ~ ~1 ~ {Item:{id:"minecraft:torch",Count:1b,components:{"minecraft:custom_name":"OPEN URL","minecraft:custom_data":{lunar:{unclickable:true,open_url:"https://lunarclient.com"}}}}}`

**Suggest Command Item**

`/summon item ~ ~1 ~ {Item:{id:"minecraft:book",Count:1b,components:{"minecraft:custom_name":"SUGGEST COMMAND","minecraft:custom_data":{lunar:{unclickable:true,suggestCommand:"/apollo"}}}}}`
`/summon item ~ ~1 ~ {Item:{id:"minecraft:book",Count:1b,components:{"minecraft:custom_name":"SUGGEST COMMAND","minecraft:custom_data":{lunar:{unclickable:true,suggest_command:"/apollo"}}}}}`

**Run Command Item**

`/summon item ~ ~1 ~ {Item:{id:"minecraft:writable_book",Count:1b,components:{"minecraft:custom_name":"RUN COMMAND","minecraft:custom_data":{lunar:{unclickable:true,runCommand:"/apollo"}}}}}`
`/summon item ~ ~1 ~ {Item:{id:"minecraft:writable_book",Count:1b,components:{"minecraft:custom_name":"RUN COMMAND","minecraft:custom_data":{lunar:{unclickable:true,run_command:"/apollo"}}}}}`

**Hide Item Tooltip Item**

`/summon item ~ ~1 ~ {Item:{id:"minecraft:sponge",Count:1b,components:{"minecraft:custom_name":"HIDE ITEM TOOLTIP","minecraft:custom_data":{lunar:{unclickable:true,hideItemTooltip:true}}}}}`
`/summon item ~ ~1 ~ {Item:{id:"minecraft:sponge",Count:1b,components:{"minecraft:custom_name":"HIDE ITEM TOOLTIP","minecraft:custom_data":{lunar:{unclickable:true,hide_item_tooltip:true}}}}}`

**Hide Slot Highlight Item**

`/summon item ~ ~1 ~ {Item:{id:"minecraft:dirt",Count:1b,components:{"minecraft:custom_name":"HIDE SLOT HIGHTLIGHT","minecraft:custom_data":{lunar:{unclickable:true,hideSlotHighlight:true}}}}}`
`/summon item ~ ~1 ~ {Item:{id:"minecraft:dirt",Count:1b,components:{"minecraft:custom_name":"HIDE SLOT HIGHTLIGHT","minecraft:custom_data":{lunar:{unclickable:true,hide_slot_highlight:true}}}}}`

</Tab>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public boolean inventoryModuleExample(Player player) {

public void inventoryModuleCommandExample(Player player) {
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:stone\",Count:1b,components:{\"minecraft:custom_name\":\"UNCLICKABLE\",\"minecraft:custom_data\":{lunar:{unclickable:true}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:paper\",Count:1b,components:{\"minecraft:custom_name\":\"COPY TO CLIPBOARD\",\"minecraft:custom_data\":{lunar:{unclickable:true,copyToClipboard:\"lunarclient.com\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:torch\",Count:1b,components:{\"minecraft:custom_name\":\"OPEN URL\",\"minecraft:custom_data\":{lunar:{unclickable:true,openUrl:\"https://lunarclient.com\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:book\",Count:1b,components:{\"minecraft:custom_name\":\"SUGGEST COMMAND\",\"minecraft:custom_data\":{lunar:{unclickable:true,suggestCommand:\"/apollo\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:writable_book\",Count:1b,components:{\"minecraft:custom_name\":\"RUN COMMAND\",\"minecraft:custom_data\":{lunar:{unclickable:true,runCommand:\"/apollo\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:sponge\",Count:1b,components:{\"minecraft:custom_name\":\"HIDE ITEM TOOLTIP\",\"minecraft:custom_data\":{lunar:{unclickable:true,hideItemTooltip:true}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:dirt\",Count:1b,components:{\"minecraft:custom_name\":\"HIDE SLOT HIGHTLIGHT\",\"minecraft:custom_data\":{lunar:{unclickable:true,hideSlotHighlight:true}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:paper\",Count:1b,components:{\"minecraft:custom_name\":\"COPY TO CLIPBOARD\",\"minecraft:custom_data\":{lunar:{unclickable:true,copy_to_clipboard:\"lunarclient.com\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:torch\",Count:1b,components:{\"minecraft:custom_name\":\"OPEN URL\",\"minecraft:custom_data\":{lunar:{unclickable:true,open_url:\"https://lunarclient.com\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:book\",Count:1b,components:{\"minecraft:custom_name\":\"SUGGEST COMMAND\",\"minecraft:custom_data\":{lunar:{unclickable:true,suggest_command:\"/apollo\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:writable_book\",Count:1b,components:{\"minecraft:custom_name\":\"RUN COMMAND\",\"minecraft:custom_data\":{lunar:{unclickable:true,run_command:\"/apollo\"}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:sponge\",Count:1b,components:{\"minecraft:custom_name\":\"HIDE ITEM TOOLTIP\",\"minecraft:custom_data\":{lunar:{unclickable:true,hide_item_tooltip:true}}}}}");
player.performCommand("summon item ~ ~1 ~ {Item:{id:\"minecraft:dirt\",Count:1b,components:{\"minecraft:custom_name\":\"HIDE SLOT HIGHTLIGHT\",\"minecraft:custom_data\":{lunar:{unclickable:true,hide_slot_highlight:true}}}}}");
}

public void inventoryModuleNMSExample(Player player) {
Expand All @@ -70,47 +70,47 @@ public void inventoryModuleNMSExample(Player player) {
);

copyToClipboardItem = ItemUtil.addTag(copyToClipboardItem, "unclickable", true);
inventory.setItem(12, ItemUtil.addTag(copyToClipboardItem, "copyToClipboard", "lunarclient.com"));
inventory.setItem(12, ItemUtil.addTag(copyToClipboardItem, "copy_to_clipboard", "lunarclient.com"));

ItemStack openUrlItem = ItemUtil.itemWithName(
Material.TORCH,
ChatColor.GOLD.toString() + ChatColor.BOLD + "OPEN URL"
);

openUrlItem = ItemUtil.addTag(openUrlItem, "unclickable", true);
inventory.setItem(14, ItemUtil.addTag(openUrlItem, "openUrl", "https://lunarclient.com"));
inventory.setItem(14, ItemUtil.addTag(openUrlItem, "open_url", "https://lunarclient.com"));

ItemStack suggestCommandItem = ItemUtil.itemWithName(
Material.BOOK,
ChatColor.GREEN.toString() + ChatColor.BOLD + "SUGGEST COMMAND"
);

suggestCommandItem = ItemUtil.addTag(suggestCommandItem, "unclickable", true);
inventory.setItem(16, ItemUtil.addTag(suggestCommandItem, "suggestCommand", "/apollo"));
inventory.setItem(16, ItemUtil.addTag(suggestCommandItem, "suggest_command", "/apollo"));

ItemStack runCommandItem = ItemUtil.itemWithName(
Material.ENCHANTED_BOOK,
ChatColor.LIGHT_PURPLE.toString() + ChatColor.BOLD + "RUN COMMAND"
);

runCommandItem = ItemUtil.addTag(runCommandItem, "unclickable", true);
inventory.setItem(29, ItemUtil.addTag(runCommandItem, "runCommand", "/apollo"));
inventory.setItem(29, ItemUtil.addTag(runCommandItem, "run_command", "/apollo"));

ItemStack hideTooltipItem = ItemUtil.itemWithName(
Material.SPONGE,
ChatColor.GRAY.toString() + ChatColor.BOLD + "HIDE ITEM TOOLTIP"
);

hideTooltipItem = ItemUtil.addTag(hideTooltipItem, "unclickable", true);
inventory.setItem(31, ItemUtil.addTag(hideTooltipItem, "hideItemTooltip", true));
inventory.setItem(31, ItemUtil.addTag(hideTooltipItem, "hide_item_tooltip", true));

ItemStack hideHighlightItem = ItemUtil.itemWithName(
Material.DIRT,
ChatColor.DARK_GRAY.toString() + ChatColor.BOLD + "HIDE SLOT HIGHTLIGHT"
);

hideHighlightItem = ItemUtil.addTag(hideHighlightItem, "unclickable", true);
inventory.setItem(33, ItemUtil.addTag(hideHighlightItem, "hideSlotHighlight", true));
inventory.setItem(33, ItemUtil.addTag(hideHighlightItem, "hide_slot_highlight", true));

player.openInventory(inventory);
}
Expand Down
Loading