From c4a89282c83252cc85f66e6f7a4c56bc4dab2c60 Mon Sep 17 00:00:00 2001 From: ItsNature Date: Thu, 12 Sep 2024 16:13:58 +0200 Subject: [PATCH] More markdown work --- .../apollo/example/modules/ChatExample.java | 6 +- docs/developers/modules/beam.mdx | 113 ++++++++--------- docs/developers/modules/border.mdx | 120 +++++++++++++++++- docs/developers/modules/chat.mdx | 101 ++++++++++++++- .../apollo/example/ApolloExamplePlugin.java | 2 +- .../example/commands/SwitchCommand.java | 1 + .../modules/impl/json/BeamJsonExample.java | 1 + .../modules/impl/json/GlowJsonExample.java | 2 +- .../modules/impl/json/NametagJsonExample.java | 4 +- .../impl/json/NickHiderJsonExample.java | 1 + .../impl/json/RichPresenceJsonExample.java | 1 + .../impl/json/StaffModJsonExample.java | 1 + .../impl/json/StopwatchJsonExample.java | 1 + .../modules/impl/json/TebexJsonExample.java | 1 + .../impl/json/VignetteJsonExample.java | 1 + .../apollo/example/utilities/JsonUtil.java | 3 - 16 files changed, 279 insertions(+), 80 deletions(-) diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/ChatExample.java b/bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/ChatExample.java index 29c71854..05cda56b 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/ChatExample.java +++ b/bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/ChatExample.java @@ -26,7 +26,6 @@ import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.module.chat.ChatModule; import com.lunarclient.apollo.recipients.Recipients; -import java.util.concurrent.ThreadLocalRandom; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; @@ -34,14 +33,13 @@ public class ChatExample { private final ChatModule chatModule = Apollo.getModuleManager().getModule(ChatModule.class); - private final int messageId = ThreadLocalRandom.current().nextInt(100); private int countdown = 5; public void displayLiveChatMessageExample() { this.chatModule.displayLiveChatMessage(Recipients.ofEveryone(), Component.text("Game starting in ", NamedTextColor.GREEN) .append(Component.text(this.countdown, NamedTextColor.BLUE)), - this.messageId + 13 ); if (--this.countdown == 0) { @@ -50,7 +48,7 @@ public void displayLiveChatMessageExample() { } public void removeLiveChatMessageExample() { - this.chatModule.removeLiveChatMessage(Recipients.ofEveryone(), this.messageId); + this.chatModule.removeLiveChatMessage(Recipients.ofEveryone(), 13); } } diff --git a/docs/developers/modules/beam.mdx b/docs/developers/modules/beam.mdx index 86fe2730..af4a937f 100644 --- a/docs/developers/modules/beam.mdx +++ b/docs/developers/modules/beam.mdx @@ -68,6 +68,62 @@ public void resetBeamsExample(Player viewer) { } ``` +### `Beam` Options + +`.id(String)` should include a unique identifier for the beam. + +```java +.id("spawn-beacon") +``` + +`.color(java.awt.Color)` is how you dictate the color of the beam. See the [colors page](/apollo/developers/utilities/colors) for more. + +**Color Types** + + + + +The `java.awt.Color` class statically exposes some colors, although they do not correspond to any existing colors used in Minecraft. + +```java +.color(Color.CYAN) +``` + + + + + +The `ApolloColors` class statically exposes colors that correspond to Bukkit/Spigot's `ChatColor` enum. + +```java +.color(ApolloColors.LIGHT_PURPLE) +``` + + + + + +Custom colors can be created from any RGB values using `new Color(int red, int green, int blue)`, or from any hex color using `Color.decode(String hex)`. + +```java +.color(Color.decode("#FF00FF")) +``` + + + + +`.location(ApolloBlockLocation)` used to determine the exact block you want the beam to be displayed on. See the [locations utilities page](/apollo/developers/utilities/locations) for more. + +```java +.location(ApolloBlockLocation.builder() + .world("world") + .x(0) + .y(60) + .z(0) + .build() +) +``` + @@ -153,60 +209,3 @@ public void resetBeamsExample(Player viewer) { - - -### `Beam` Options - -`.id(String)` should include a unique identifier for the beam. - -```java -.id("spawn-beacon") -``` - -`.color(java.awt.Color)` is how you dictate the color of the beam. See the [colors page](/apollo/developers/utilities/colors) for more. - -**Color Types** - - - - -The `java.awt.Color` class statically exposes some colors, although they do not correspond to any existing colors used in Minecraft. - -```java -.color(Color.CYAN) -``` - - - - - -The `ApolloColors` class statically exposes colors that correspond to Bukkit/Spigot's `ChatColor` enum. - -```java -.color(ApolloColors.LIGHT_PURPLE) -``` - - - - - -Custom colors can be created from any RGB values using `new Color(int red, int green, int blue)`, or from any hex color using `Color.decode(String hex)`. - -```java -.color(Color.decode("#FF00FF")) -``` - - - - -`.location(ApolloBlockLocation)` used to determine the exact block you want the beam to be displayed on. See the [locations utilities page](/apollo/developers/utilities/locations) for more. - -```java -.location(ApolloBlockLocation.builder() - .world("world") - .x(0) - .y(60) - .z(0) - .build() -) -``` diff --git a/docs/developers/modules/border.mdx b/docs/developers/modules/border.mdx index 681e5c87..42d89504 100644 --- a/docs/developers/modules/border.mdx +++ b/docs/developers/modules/border.mdx @@ -15,6 +15,13 @@ The border module not only enhances Minecraft's current world border system, but ## Integration ### Sample Code +Explore each integration by cycling through each tab, to find the best fit for your requirements and needs. + + + + + +### Displaying a Border ```java public void displayBorderExample(Player viewer) { @@ -42,6 +49,24 @@ public void displayBorderExample(Player viewer) { } ``` +### Removing a Border + +```java +public void removeBorderExample(Player viewer) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); + apolloPlayerOpt.ifPresent(apolloPlayer -> this.borderModule.removeBorder(apolloPlayer, "pvp-tagged-spawn")); +} +``` + +### Resetting all Borders + +```java +public void resetBordersExample(Player viewer) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); + apolloPlayerOpt.ifPresent(this.borderModule::resetBorders); +} +``` + ### `Border` Options `.id(String)` should include a unique identifier for the border. It's important when you have multiple borders in a single world. @@ -128,20 +153,103 @@ Custom colors can be created from any RGB values using `new Color(int red, int g .durationTicks(0) ``` -### Removing a specific border for a player + + + + +### Displaying a Border + +```java +public void displayBorderExample(Player viewer) { + DisplayBorderMessage message = DisplayBorderMessage.newBuilder() + .setId("pvp-tagged-spawn") + .setWorld("world") + .setCancelEntry(true) + .setCancelExit(true) + .setCanShrinkOrExpand(false) + .setColor(ProtobufUtil.createColorProto(Color.RED)) + .setBounds(ProtobufUtil.createCuboid2DProto(Cuboid2D.builder() + .minX(-50) + .minZ(-50) + .maxX(50) + .maxZ(50) + .build())) + .setDurationTicks(1000) + .build(); + + ProtobufPacketUtil.sendPacket(viewer, message); +} +``` + +### Removing a Border ```java public void removeBorderExample(Player viewer) { - Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); - apolloPlayerOpt.ifPresent(apolloPlayer -> this.borderModule.removeBorder(apolloPlayer, "pvp-tagged-spawn")); + RemoveBorderMessage message = RemoveBorderMessage.newBuilder() + .setId("pvp-tagged-spawn") + .build(); + + ProtobufPacketUtil.sendPacket(viewer, message); } ``` -### Resetting all borders for a player +### Resetting all Borders ```java public void resetBordersExample(Player viewer) { - Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); - apolloPlayerOpt.ifPresent(this.borderModule::resetBorders); + ResetBordersMessage message = ResetBordersMessage.getDefaultInstance(); + ProtobufPacketUtil.sendPacket(viewer, message); +} +``` + + + + + +### Displaying a Border + +```java +public void displayBorderExample(Player viewer) { + JsonObject message = new JsonObject(); + message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.border.v1.DisplayBorderMessage"); + message.addProperty("id", "pvp-tagged-spawn"); + message.addProperty("world", "world"); + message.addProperty("cancel_entry", true); + message.addProperty("cancel_exit", true); + message.addProperty("can_shrink_or_expand", false); + message.add("color", JsonUtil.createColorObject(Color.RED)); + message.add("bounds", JsonUtil.createCuboid2DObject( + Cuboid2D.builder().minX(-50).minZ(-50).maxX(50).maxZ(50).build() + )); + message.addProperty("duration_ticks", 1000); + + JsonPacketUtil.sendPacket(viewer, message); } ``` + +### Removing a Border + +```java +public void removeBorderExample(Player viewer) { + JsonObject message = new JsonObject(); + message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.border.v1.RemoveBorderMessage"); + message.addProperty("id", "pvp-tagged-spawn"); + + JsonPacketUtil.sendPacket(viewer, message); +} +``` + +### Resetting all Borders + +```java +public void resetBordersExample(Player viewer) { + JsonObject message = new JsonObject(); + message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.border.v1.ResetBordersMessage"); + + JsonPacketUtil.sendPacket(viewer, message); +} +``` + + + + diff --git a/docs/developers/modules/chat.mdx b/docs/developers/modules/chat.mdx index 99469f23..6b2081c2 100644 --- a/docs/developers/modules/chat.mdx +++ b/docs/developers/modules/chat.mdx @@ -15,15 +15,23 @@ The chat module allows you to interact with and modify users chat feeds. ## Integration +### Sample Code +Explore each integration by cycling through each tab, to find the best fit for your requirements and needs. + + + + + +### Displaying a Live Chat Message + ```java -private final int messageId = ThreadLocalRandom.current().nextInt(100); private int countdown = 5; -public void displayLiveMessageExample() { +public void displayLiveChatMessageExample() { this.chatModule.displayLiveChatMessage(Recipients.ofEveryone(), Component.text("Game starting in ", NamedTextColor.GREEN) .append(Component.text(this.countdown, NamedTextColor.BLUE)), - this.messageId + 13 ); if (--this.countdown == 0) { @@ -32,10 +40,91 @@ public void displayLiveMessageExample() { } ``` -### Removing a specific live message for a player +### Removing a Live Chat Message + +```java +public void removeLiveChatMessageExample() { + this.chatModule.removeLiveChatMessage(Recipients.ofEveryone(), 13); +} +``` + + + + + +### Displaying a Live Chat Message + +```java +private int countdown = 5; + +public void displayLiveChatMessageExample() { + DisplayLiveChatMessageMessage message = DisplayLiveChatMessageMessage.newBuilder() + .setAdventureJsonLines(AdventureUtil.toJson( + Component.text("Game starting in ", NamedTextColor.GREEN) + .append(Component.text(this.countdown, NamedTextColor.BLUE))) + ) + .setMessageId(13) + .build(); + + if (--this.countdown == 0) { + this.countdown = 5; + } + + ProtobufPacketUtil.broadcastPacket(message); +} +``` + +### Removing a Live Chat Message + +```java +public void removeLiveChatMessageExample() { + RemoveLiveChatMessageMessage message = RemoveLiveChatMessageMessage.newBuilder() + .setMessageId(13) + .build(); + + ProtobufPacketUtil.broadcastPacket(message); +} +``` + + + + + +### Displaying a Live Chat Message + +```java +private int countdown = 5; + +public void displayLiveChatMessageExample() { + JsonObject message = new JsonObject(); + message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.chat.v1.DisplayLiveChatMessageMessage"); + message.addProperty("message_id", 13); + message.addProperty("adventure_json_lines", AdventureUtil.toJson( + Component.text("Game starting in ", NamedTextColor.GREEN) + .append(Component.text(this.countdown, NamedTextColor.BLUE)) + )); + + if (--this.countdown == 0) { + this.countdown = 5; + } + + JsonPacketUtil.broadcastPacket(message); +} +``` + +### Removing a Live Chat Message ```java -public void removeLiveMessageExample() { - this.chatModule.removeLiveChatMessage(Recipients.ofEveryone(), this.messageId); +public void removeLiveChatMessageExample() { + JsonObject message = new JsonObject(); + message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.chat.v1.RemoveLiveChatMessageMessage"); + message.addProperty("message_id", 13); + + JsonPacketUtil.broadcastPacket(message); } ``` + + + + + diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java index 5fda8952..f49069fb 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java @@ -174,7 +174,7 @@ public class ApolloExamplePlugin extends JavaPlugin { public void onEnable() { plugin = this; - this.changeImplementationType(ApolloExampleType.PROTO); + this.changeImplementationType(ApolloExampleType.JSON); this.registerCommands(); } diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/commands/SwitchCommand.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/commands/SwitchCommand.java index f43ec2f0..14a19b5a 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/commands/SwitchCommand.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/commands/SwitchCommand.java @@ -37,6 +37,7 @@ public class SwitchCommand implements CommandExecutor { public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (args.length != 1) { sender.sendMessage("Usage: /switch "); + sender.sendMessage("Current implementation: " + ApolloExamplePlugin.TYPE.name()); return true; } diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BeamJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BeamJsonExample.java index fbbeb477..82df13e9 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BeamJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BeamJsonExample.java @@ -32,6 +32,7 @@ import org.bukkit.Location; import org.bukkit.entity.Player; +// DONE public class BeamJsonExample extends BeamExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/GlowJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/GlowJsonExample.java index bd2447d9..ce45539c 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/GlowJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/GlowJsonExample.java @@ -47,7 +47,7 @@ public void overrideGlowEffectExample(UUID glowingPlayer) { public void resetGlowEffectExample(UUID glowingPlayer) { JsonObject message = new JsonObject(); message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.glow.v1.ResetGlowEffectMessage"); - message.add("uuid", JsonUtil.createUuidObject(glowingPlayer)); + message.add("player_uuid", JsonUtil.createUuidObject(glowingPlayer)); JsonPacketUtil.broadcastPacket(message); } diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NametagJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NametagJsonExample.java index 3d278398..d807903b 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NametagJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NametagJsonExample.java @@ -55,7 +55,7 @@ public void overrideNametagExample(Player target) { JsonObject message = new JsonObject(); message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.nametag.v1.OverrideNametagMessage"); - message.add("uuid", JsonUtil.createUuidObject(target.getUniqueId())); + message.add("player_uuid", JsonUtil.createUuidObject(target.getUniqueId())); message.add("adventure_json_lines", lines); JsonPacketUtil.broadcastPacket(message); @@ -65,7 +65,7 @@ public void overrideNametagExample(Player target) { public void resetNametagExample(Player target) { JsonObject message = new JsonObject(); message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.nametag.v1.ResetNametagMessage"); - message.add("uuid", JsonUtil.createUuidObject(target.getUniqueId())); + message.add("player_uuid", JsonUtil.createUuidObject(target.getUniqueId())); JsonPacketUtil.broadcastPacket(message); } diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NickHiderJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NickHiderJsonExample.java index 0487a6fd..4a677549 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NickHiderJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/NickHiderJsonExample.java @@ -28,6 +28,7 @@ import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import org.bukkit.entity.Player; +// DONE public class NickHiderJsonExample extends NickHiderExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/RichPresenceJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/RichPresenceJsonExample.java index 07ccf8fc..c9e44bdf 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/RichPresenceJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/RichPresenceJsonExample.java @@ -28,6 +28,7 @@ import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import org.bukkit.entity.Player; +// DONE public class RichPresenceJsonExample extends RichPresenceExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StaffModJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StaffModJsonExample.java index 77ef4166..0825a975 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StaffModJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StaffModJsonExample.java @@ -30,6 +30,7 @@ import java.util.stream.Stream; import org.bukkit.entity.Player; +// DONE public class StaffModJsonExample extends StaffModExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StopwatchJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StopwatchJsonExample.java index 82f5c1ba..e9c14c6e 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StopwatchJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/StopwatchJsonExample.java @@ -28,6 +28,7 @@ import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import org.bukkit.entity.Player; +// DONE public class StopwatchJsonExample extends StopwatchExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/TebexJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/TebexJsonExample.java index ceb932bd..db416952 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/TebexJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/TebexJsonExample.java @@ -28,6 +28,7 @@ import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import org.bukkit.entity.Player; +// TODO: remove until the module is out public class TebexJsonExample extends TebexExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/VignetteJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/VignetteJsonExample.java index 59c5cc7b..fd1020f7 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/VignetteJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/VignetteJsonExample.java @@ -28,6 +28,7 @@ import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import org.bukkit.entity.Player; +// DONE public class VignetteJsonExample extends VignetteExample { @Override diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/JsonUtil.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/JsonUtil.java index f8464efc..fbbce87b 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/JsonUtil.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/JsonUtil.java @@ -108,7 +108,6 @@ public static JsonObject createIconObject(@NotNull Icon icon) { ItemStackIcon item = (ItemStackIcon) icon; String itemName = item.getItemName(); - iconObject.addProperty("@type", "type.googleapis.com/lunarclient.apollo.common.v1.ItemStackIcon"); iconObject.addProperty("item_id", item.getItemId()); iconObject.addProperty("custom_model_data", item.getCustomModelData()); @@ -118,13 +117,11 @@ public static JsonObject createIconObject(@NotNull Icon icon) { } else if (icon instanceof SimpleResourceLocationIcon) { SimpleResourceLocationIcon simple = (SimpleResourceLocationIcon) icon; - iconObject.addProperty("@type", "type.googleapis.com/lunarclient.apollo.common.v1.SimpleResourceLocationIcon"); iconObject.addProperty("resource_location", simple.getResourceLocation()); iconObject.addProperty("size", simple.getSize()); } else if (icon instanceof AdvancedResourceLocationIcon) { AdvancedResourceLocationIcon advanced = (AdvancedResourceLocationIcon) icon; - iconObject.addProperty("@type", "type.googleapis.com/lunarclient.apollo.common.v1.AdvancedResourceLocationIcon"); iconObject.addProperty("resource_location", advanced.getResourceLocation()); iconObject.addProperty("width", advanced.getWidth()); iconObject.addProperty("height", advanced.getHeight());