diff --git a/docs/developers/modules/border.mdx b/docs/developers/modules/border.mdx index 42d89504..98f70da1 100644 --- a/docs/developers/modules/border.mdx +++ b/docs/developers/modules/border.mdx @@ -168,12 +168,7 @@ public void displayBorderExample(Player viewer) { .setCancelExit(true) .setCanShrinkOrExpand(false) .setColor(ProtobufUtil.createColorProto(Color.RED)) - .setBounds(ProtobufUtil.createCuboid2DProto(Cuboid2D.builder() - .minX(-50) - .minZ(-50) - .maxX(50) - .maxZ(50) - .build())) + .setBounds(ProtobufUtil.createCuboid2DProto(-50, -50, 50, 50)) .setDurationTicks(1000) .build(); @@ -218,9 +213,7 @@ public void displayBorderExample(Player viewer) { 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.add("bounds", JsonUtil.createCuboid2DObject(-50, -50, 50, 50)); message.addProperty("duration_ticks", 1000); JsonPacketUtil.sendPacket(viewer, message); diff --git a/docs/developers/modules/cooldown.mdx b/docs/developers/modules/cooldown.mdx index 5e61f4c5..e0bf5edc 100644 --- a/docs/developers/modules/cooldown.mdx +++ b/docs/developers/modules/cooldown.mdx @@ -121,9 +121,7 @@ public void displayCooldownItemExample(Player viewer) { DisplayCooldownMessage message = DisplayCooldownMessage.newBuilder() .setName("enderpearl-cooldown") .setDuration(ProtobufUtil.createDurationProto(Duration.ofSeconds(15))) - .setIcon(ProtobufUtil.createIconProto(ItemStackIcon.builder() - .itemName("ENDER_PEARL") - .build())) + .setIcon(ProtobufUtil.createItemStackIconProto("ENDER_PEARL", 0, 0)) .build(); ProtobufPacketUtil.sendPacket(viewer, message); @@ -137,10 +135,7 @@ public void displayCooldownResourceExample(Player viewer) { DisplayCooldownMessage message = DisplayCooldownMessage.newBuilder() .setName("lunar-cooldown") .setDuration(ProtobufUtil.createDurationProto(Duration.ofSeconds(15))) - .setIcon(ProtobufUtil.createIconProto(SimpleResourceLocationIcon.builder() - .resourceLocation("lunar:logo/logo-200x182.svg") - .size(12) - .build())) + .setIcon(ProtobufUtil.createSimpleResourceLocationIconProto("lunar:logo/logo-200x182.svg", 12)) .build(); ProtobufPacketUtil.sendPacket(viewer, message); @@ -180,11 +175,7 @@ public void displayCooldownItemExample(Player viewer) { message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.cooldown.v1.DisplayCooldownMessage"); message.addProperty("name", "enderpearl-cooldown"); message.addProperty("duration", JsonUtil.createDurationObject(Duration.ofSeconds(15))); - message.add("icon", JsonUtil.createIconObject( - ItemStackIcon.builder() - .itemName("ENDER_PEARL") - .build()) - ); + message.add("icon", JsonUtil.createItemStackIconObject("ENDER_PEARL", 0, 0)); JsonPacketUtil.sendPacket(viewer, message); } @@ -198,12 +189,7 @@ public void displayCooldownResourceExample(Player viewer) { message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.cooldown.v1.DisplayCooldownMessage"); message.addProperty("name", "lunar-cooldown"); message.addProperty("duration", JsonUtil.createDurationObject(Duration.ofSeconds(15))); - message.add("icon", JsonUtil.createIconObject( - SimpleResourceLocationIcon.builder() - .resourceLocation("lunar:logo/logo-200x182.svg") - .size(12) - .build()) - ); + message.add("icon", JsonUtil.createSimpleResourceLocationIconObject("lunar:logo/logo-200x182.svg", 12)); JsonPacketUtil.sendPacket(viewer, 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 f49069fb..20a5d030 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 @@ -133,9 +133,6 @@ @Getter public class ApolloExamplePlugin extends JavaPlugin { - // TODO: - // Available module options - @Getter private static ApolloExamplePlugin plugin; diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BorderJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BorderJsonExample.java index 7dda97cb..9a771a03 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BorderJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/BorderJsonExample.java @@ -27,7 +27,6 @@ import com.lunarclient.apollo.example.modules.impl.BorderExample; import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import com.lunarclient.apollo.example.utilities.JsonUtil; -import com.lunarclient.apollo.example.utilities.objects.cuboid.Cuboid2D; import java.awt.Color; import org.bukkit.entity.Player; @@ -43,9 +42,7 @@ public void displayBorderExample(Player viewer) { 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.add("bounds", JsonUtil.createCuboid2DObject(-50, -50, 50, 50)); message.addProperty("duration_ticks", 1000); JsonPacketUtil.sendPacket(viewer, message); diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/CooldownJsonExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/CooldownJsonExample.java index c9a13ef3..3dbedab4 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/CooldownJsonExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/json/CooldownJsonExample.java @@ -27,8 +27,6 @@ import com.lunarclient.apollo.example.modules.impl.CooldownExample; import com.lunarclient.apollo.example.utilities.JsonPacketUtil; import com.lunarclient.apollo.example.utilities.JsonUtil; -import com.lunarclient.apollo.example.utilities.objects.icon.ItemStackIcon; -import com.lunarclient.apollo.example.utilities.objects.icon.SimpleResourceLocationIcon; import java.time.Duration; import org.bukkit.entity.Player; @@ -40,11 +38,7 @@ public void displayCooldownItemExample(Player viewer) { message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.cooldown.v1.DisplayCooldownMessage"); message.addProperty("name", "enderpearl-cooldown"); message.addProperty("duration", JsonUtil.createDurationObject(Duration.ofSeconds(15))); - message.add("icon", JsonUtil.createIconObject( - ItemStackIcon.builder() - .itemName("ENDER_PEARL") - .build()) - ); + message.add("icon", JsonUtil.createItemStackIconObject("ENDER_PEARL", 0, 0)); JsonPacketUtil.sendPacket(viewer, message); } @@ -55,12 +49,7 @@ public void displayCooldownResourceExample(Player viewer) { message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.cooldown.v1.DisplayCooldownMessage"); message.addProperty("name", "lunar-cooldown"); message.addProperty("duration", JsonUtil.createDurationObject(Duration.ofSeconds(15))); - message.add("icon", JsonUtil.createIconObject( - SimpleResourceLocationIcon.builder() - .resourceLocation("lunar:logo/logo-200x182.svg") - .size(12) - .build()) - ); + message.add("icon", JsonUtil.createSimpleResourceLocationIconObject("lunar:logo/logo-200x182.svg", 12)); JsonPacketUtil.sendPacket(viewer, message); } diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/BorderProtoExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/BorderProtoExample.java index 73e94de1..af035b40 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/BorderProtoExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/BorderProtoExample.java @@ -29,7 +29,6 @@ import com.lunarclient.apollo.example.modules.impl.BorderExample; import com.lunarclient.apollo.example.utilities.ProtobufPacketUtil; import com.lunarclient.apollo.example.utilities.ProtobufUtil; -import com.lunarclient.apollo.example.utilities.objects.cuboid.Cuboid2D; import java.awt.Color; import org.bukkit.entity.Player; @@ -44,12 +43,7 @@ public void displayBorderExample(Player viewer) { .setCancelExit(true) .setCanShrinkOrExpand(false) .setColor(ProtobufUtil.createColorProto(Color.RED)) - .setBounds(ProtobufUtil.createCuboid2DProto(Cuboid2D.builder() - .minX(-50) - .minZ(-50) - .maxX(50) - .maxZ(50) - .build())) + .setBounds(ProtobufUtil.createCuboid2DProto(-50, -50, 50, 50)) .setDurationTicks(1000) .build(); diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/CooldownProtoExample.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/CooldownProtoExample.java index 74c6ab9a..9000d513 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/CooldownProtoExample.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/modules/impl/proto/CooldownProtoExample.java @@ -29,8 +29,6 @@ import com.lunarclient.apollo.example.modules.impl.CooldownExample; import com.lunarclient.apollo.example.utilities.ProtobufPacketUtil; import com.lunarclient.apollo.example.utilities.ProtobufUtil; -import com.lunarclient.apollo.example.utilities.objects.icon.ItemStackIcon; -import com.lunarclient.apollo.example.utilities.objects.icon.SimpleResourceLocationIcon; import java.time.Duration; import org.bukkit.entity.Player; @@ -41,9 +39,7 @@ public void displayCooldownItemExample(Player viewer) { DisplayCooldownMessage message = DisplayCooldownMessage.newBuilder() .setName("enderpearl-cooldown") .setDuration(ProtobufUtil.createDurationProto(Duration.ofSeconds(15))) - .setIcon(ProtobufUtil.createIconProto(ItemStackIcon.builder() - .itemName("ENDER_PEARL") - .build())) + .setIcon(ProtobufUtil.createItemStackIconProto("ENDER_PEARL", 0, 0)) .build(); ProtobufPacketUtil.sendPacket(viewer, message); @@ -54,10 +50,7 @@ public void displayCooldownResourceExample(Player viewer) { DisplayCooldownMessage message = DisplayCooldownMessage.newBuilder() .setName("lunar-cooldown") .setDuration(ProtobufUtil.createDurationProto(Duration.ofSeconds(15))) - .setIcon(ProtobufUtil.createIconProto(SimpleResourceLocationIcon.builder() - .resourceLocation("lunar:logo/logo-200x182.svg") - .size(12) - .build())) + .setIcon(ProtobufUtil.createSimpleResourceLocationIconProto("lunar:logo/logo-200x182.svg", 12)) .build(); ProtobufPacketUtil.sendPacket(viewer, message); 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 472b80a8..aa2a7cba 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 @@ -24,17 +24,13 @@ package com.lunarclient.apollo.example.utilities; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.utilities.objects.cuboid.Cuboid2D; -import com.lunarclient.apollo.example.utilities.objects.icon.AdvancedResourceLocationIcon; -import com.lunarclient.apollo.example.utilities.objects.icon.Icon; -import com.lunarclient.apollo.example.utilities.objects.icon.ItemStackIcon; -import com.lunarclient.apollo.example.utilities.objects.icon.SimpleResourceLocationIcon; import java.awt.Color; import java.time.Duration; import java.util.UUID; import org.bukkit.Location; import org.bukkit.entity.Entity; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public final class JsonUtil { @@ -100,51 +96,54 @@ public static JsonObject createEntityIdObject(@NotNull Entity entity) { return entityIdObject; } - public static JsonObject createCuboid2DObject(@NotNull Cuboid2D cuboid2D) { + public static JsonObject createCuboid2DObject(double minX, double minZ, double maxX, double maxZ) { JsonObject cuboid2DObject = new JsonObject(); - cuboid2DObject.addProperty("min_x", cuboid2D.getMinX()); - cuboid2DObject.addProperty("min_z", cuboid2D.getMinZ()); - cuboid2DObject.addProperty("max_x", cuboid2D.getMaxX()); - cuboid2DObject.addProperty("max_z", cuboid2D.getMaxZ()); + cuboid2DObject.addProperty("min_x", minX); + cuboid2DObject.addProperty("min_z", minZ); + cuboid2DObject.addProperty("max_x", maxX); + cuboid2DObject.addProperty("max_z", maxZ); return cuboid2DObject; } - public static JsonObject createIconObject(@NotNull Icon icon) { + public static JsonObject createItemStackIconObject(@Nullable String itemName, int itemId, int customModelData) { + JsonObject itemIconObject = new JsonObject(); + if (itemName != null) { + itemIconObject.addProperty("item_name", itemName); + } else { + itemIconObject.addProperty("item_id", itemId); + } + + itemIconObject.addProperty("custom_model_data", customModelData); + JsonObject iconObject = new JsonObject(); + iconObject.add("item_stack", itemIconObject); + return iconObject; + } - if (icon instanceof ItemStackIcon) { - ItemStackIcon item = (ItemStackIcon) icon; - String itemName = item.getItemName(); - - JsonObject itemIconObject = new JsonObject(); - if (itemName != null) { - itemIconObject.addProperty("item_name", itemName); - } else { - itemIconObject.addProperty("item_id", item.getItemId()); - } - - itemIconObject.addProperty("custom_model_data", item.getCustomModelData()); - iconObject.add("item_stack", itemIconObject); - } else if (icon instanceof SimpleResourceLocationIcon) { - SimpleResourceLocationIcon simple = (SimpleResourceLocationIcon) icon; - - JsonObject simpleIconObject = new JsonObject(); - simpleIconObject.addProperty("resource_location", simple.getResourceLocation()); - simpleIconObject.addProperty("size", simple.getSize()); - iconObject.add("simple_resource_location", simpleIconObject); - } else if (icon instanceof AdvancedResourceLocationIcon) { - AdvancedResourceLocationIcon advanced = (AdvancedResourceLocationIcon) icon; - - JsonObject advancedIcon = new JsonObject(); - advancedIcon.addProperty("resource_location", advanced.getResourceLocation()); - advancedIcon.addProperty("width", advanced.getWidth()); - advancedIcon.addProperty("height", advanced.getHeight()); - advancedIcon.addProperty("min_u", advanced.getMinU()); - advancedIcon.addProperty("max_u", advanced.getMaxU()); - advancedIcon.addProperty("min_v", advanced.getMinV()); - advancedIcon.addProperty("max_v", advanced.getMaxV()); - iconObject.add("advanced_resource_location", advancedIcon); - } + public static JsonObject createSimpleResourceLocationIconObject(String resourceLocation, int size) { + JsonObject simpleIconObject = new JsonObject(); + simpleIconObject.addProperty("resource_location", resourceLocation); + simpleIconObject.addProperty("size", size); + + JsonObject iconObject = new JsonObject(); + iconObject.add("simple_resource_location", simpleIconObject); + + return iconObject; + } + + public static JsonObject createAdvancedResourceLocationIconObject(String resourceLocation, float width, float height, + float minU, float maxU, float minV, float maxV) { + JsonObject advancedIcon = new JsonObject(); + advancedIcon.addProperty("resource_location", resourceLocation); + advancedIcon.addProperty("width", width); + advancedIcon.addProperty("height", height); + advancedIcon.addProperty("min_u", minU); + advancedIcon.addProperty("max_u", maxU); + advancedIcon.addProperty("min_v", minV); + advancedIcon.addProperty("max_v", maxV); + + JsonObject iconObject = new JsonObject(); + iconObject.add("advanced_resource_location", advancedIcon); return iconObject; } diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/ProtobufUtil.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/ProtobufUtil.java index 7fffeb7d..6d04b372 100644 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/ProtobufUtil.java +++ b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/ProtobufUtil.java @@ -24,18 +24,20 @@ package com.lunarclient.apollo.example.utilities; import com.google.protobuf.Timestamp; +import com.lunarclient.apollo.common.v1.AdvancedResourceLocationIcon; +import com.lunarclient.apollo.common.v1.BlockLocation; +import com.lunarclient.apollo.common.v1.Cuboid2D; import com.lunarclient.apollo.common.v1.EntityId; +import com.lunarclient.apollo.common.v1.Icon; +import com.lunarclient.apollo.common.v1.ItemStackIcon; +import com.lunarclient.apollo.common.v1.SimpleResourceLocationIcon; import com.lunarclient.apollo.common.v1.Uuid; -import com.lunarclient.apollo.example.utilities.objects.cuboid.Cuboid2D; -import com.lunarclient.apollo.example.utilities.objects.icon.AdvancedResourceLocationIcon; -import com.lunarclient.apollo.example.utilities.objects.icon.Icon; -import com.lunarclient.apollo.example.utilities.objects.icon.ItemStackIcon; -import com.lunarclient.apollo.example.utilities.objects.icon.SimpleResourceLocationIcon; import java.awt.Color; import java.time.Duration; import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.Location; +import org.jetbrains.annotations.Nullable; public final class ProtobufUtil { @@ -94,8 +96,8 @@ public static com.lunarclient.apollo.common.v1.Location createLocationProto(Loca .build(); } - public static com.lunarclient.apollo.common.v1.BlockLocation createBlockLocationProto(Location location) { - return com.lunarclient.apollo.common.v1.BlockLocation.newBuilder() + public static BlockLocation createBlockLocationProto(Location location) { + return BlockLocation.newBuilder() .setWorld(location.getWorld().getName()) .setX(location.getBlockX()) .setY(location.getBlockY()) @@ -103,53 +105,49 @@ public static com.lunarclient.apollo.common.v1.BlockLocation createBlockLocation .build(); } - public static com.lunarclient.apollo.common.v1.Cuboid2D createCuboid2DProto(Cuboid2D object) { - return com.lunarclient.apollo.common.v1.Cuboid2D.newBuilder() - .setMinX(object.getMinX()) - .setMinZ(object.getMinZ()) - .setMaxX(object.getMaxX()) - .setMaxZ(object.getMaxZ()) + public static Cuboid2D createCuboid2DProto(double minX, double minZ, double maxX, double maxZ) { + return Cuboid2D.newBuilder() + .setMinX(minX) + .setMinZ(minZ) + .setMaxX(maxX) + .setMaxZ(maxZ) .build(); } - public static com.lunarclient.apollo.common.v1.Icon createIconProto(Icon icon) { - com.lunarclient.apollo.common.v1.Icon.Builder builder = com.lunarclient.apollo.common.v1.Icon.newBuilder(); - - if (icon instanceof ItemStackIcon) { - ItemStackIcon item = (ItemStackIcon) icon; - String itemName = item.getItemName(); - - com.lunarclient.apollo.common.v1.ItemStackIcon.Builder itemBuilder = com.lunarclient.apollo.common.v1.ItemStackIcon.newBuilder() - .setItemId(item.getItemId()) - .setCustomModelData(item.getCustomModelData()); - - if (itemName != null) { - itemBuilder.setItemName(itemName); - } - - builder.setItemStack(itemBuilder.build()); - } else if (icon instanceof SimpleResourceLocationIcon) { - SimpleResourceLocationIcon simple = (SimpleResourceLocationIcon) icon; - - builder.setSimpleResourceLocation(com.lunarclient.apollo.common.v1.SimpleResourceLocationIcon.newBuilder() - .setResourceLocation(simple.getResourceLocation()) - .setSize(simple.getSize()) - .build()); - } else if (icon instanceof AdvancedResourceLocationIcon) { - AdvancedResourceLocationIcon advanced = (AdvancedResourceLocationIcon) icon; - - builder.setAdvancedResourceLocation(com.lunarclient.apollo.common.v1.AdvancedResourceLocationIcon.newBuilder() - .setResourceLocation(advanced.getResourceLocation()) - .setWidth(advanced.getWidth()) - .setHeight(advanced.getHeight()) - .setMinU(advanced.getMinU()) - .setMaxU(advanced.getMaxU()) - .setMinV(advanced.getMinV()) - .setMaxV(advanced.getMaxV()) - .build()); + public static Icon createItemStackIconProto(@Nullable String itemName, int itemId, int customModelData) { + ItemStackIcon.Builder iconBuilder = ItemStackIcon.newBuilder() + .setItemId(itemId) + .setCustomModelData(customModelData); + + if (itemName != null) { + iconBuilder.setItemName(itemName); } - return builder.build(); + return Icon.newBuilder().setItemStack(iconBuilder.build()).build(); + } + + public static Icon createSimpleResourceLocationIconProto(String resourceLocation, int size) { + SimpleResourceLocationIcon icon = SimpleResourceLocationIcon.newBuilder() + .setResourceLocation(resourceLocation) + .setSize(size) + .build(); + + return Icon.newBuilder().setSimpleResourceLocation(icon).build(); + } + + public static Icon createAdvancedResourceLocationIconProto(String resourceLocation, float width, float height, + float minU, float maxU, float minV, float maxV) { + AdvancedResourceLocationIcon icon = AdvancedResourceLocationIcon.newBuilder() + .setResourceLocation(resourceLocation) + .setWidth(width) + .setHeight(height) + .setMinU(minU) + .setMaxU(maxU) + .setMinV(minV) + .setMaxV(maxV) + .build(); + + return Icon.newBuilder().setAdvancedResourceLocation(icon).build(); } private ProtobufUtil() { diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/cuboid/Cuboid2D.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/cuboid/Cuboid2D.java deleted file mode 100644 index d43f37cc..00000000 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/cuboid/Cuboid2D.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.utilities.objects.cuboid; - -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public final class Cuboid2D { - - double minX; - - double minZ; - - double maxX; - - double maxZ; - -} diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/cuboid/Cuboid3D.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/cuboid/Cuboid3D.java deleted file mode 100644 index ca6054b2..00000000 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/cuboid/Cuboid3D.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.utilities.objects.cuboid; - -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public final class Cuboid3D { - - double minX; - - double minY; - - double minZ; - - double maxX; - - double maxY; - - double maxZ; - -} diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/AdvancedResourceLocationIcon.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/AdvancedResourceLocationIcon.java deleted file mode 100644 index 84d37ec2..00000000 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/AdvancedResourceLocationIcon.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.utilities.objects.icon; - -import lombok.Builder; -import lombok.Getter; -import org.jetbrains.annotations.Range; - -@Getter -@Builder -public final class AdvancedResourceLocationIcon extends Icon { - - String resourceLocation; - - @Range(from = 0, to = Integer.MAX_VALUE) float width; - - @Range(from = 0, to = Integer.MAX_VALUE) float height; - - @Range(from = 0, to = 1) float minU; - - @Range(from = 0, to = 1) float maxU; - - @Range(from = 0, to = 1) float minV; - - @Range(from = 0, to = 1) float maxV; - -} diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/Icon.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/Icon.java deleted file mode 100644 index c65dbfe0..00000000 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/Icon.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.utilities.objects.icon; - -public abstract class Icon { - -} diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/ItemStackIcon.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/ItemStackIcon.java deleted file mode 100644 index 8ba57f11..00000000 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/ItemStackIcon.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.utilities.objects.icon; - -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public final class ItemStackIcon extends Icon { - - String itemName; - - int itemId; - - int customModelData; - -} diff --git a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/SimpleResourceLocationIcon.java b/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/SimpleResourceLocationIcon.java deleted file mode 100644 index a3f872fb..00000000 --- a/lightweight-bukkit-example/src/main/java/com/lunarclient/apollo/example/utilities/objects/icon/SimpleResourceLocationIcon.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.utilities.objects.icon; - -import lombok.Builder; -import lombok.Getter; -import org.jetbrains.annotations.Range; - -@Getter -@Builder -public final class SimpleResourceLocationIcon extends Icon { - - String resourceLocation; - - @Range(from = 0, to = Integer.MAX_VALUE) int size; - -}