diff --git a/docs/developers/modules/inventory.mdx b/docs/developers/modules/inventory.mdx index 35615fe2..62b9a65a 100644 --- a/docs/developers/modules/inventory.mdx +++ b/docs/developers/modules/inventory.mdx @@ -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}}}}}` diff --git a/example/bukkit/common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java b/example/bukkit/common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java index 37e62f7c..5d5ed71a 100644 --- a/example/bukkit/common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java +++ b/example/bukkit/common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java @@ -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) { @@ -70,7 +70,7 @@ 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, @@ -78,7 +78,7 @@ public void inventoryModuleNMSExample(Player player) { ); 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, @@ -86,7 +86,7 @@ public void inventoryModuleNMSExample(Player player) { ); 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, @@ -94,7 +94,7 @@ public void inventoryModuleNMSExample(Player player) { ); 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, @@ -102,7 +102,7 @@ public void inventoryModuleNMSExample(Player player) { ); 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, @@ -110,7 +110,7 @@ public void inventoryModuleNMSExample(Player player) { ); 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); }