diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 000000000..86531795a --- /dev/null +++ b/.github/README.md @@ -0,0 +1,87 @@ +![](https://i.imgur.com/VdgyD5m.png) +# Apollo +[![Discord](https://img.shields.io/discord/1080556677004271666?logo=discord&label=discord)](https://lunarclient.dev/discord) +[![Latest Release](https://img.shields.io/github/v/release/LunarClient/Apollo.svg)](https://github.com/LunarClient/Apollo/releases) +[![License](https://img.shields.io/github/license/LunarClient/Apollo.svg)](https://github.com/LunarClient/Apollo/blob/master/license.txt) + +Apollo is a powerful tool that allows developers to create custom integrations with Lunar Client. + +**Resources** +- [Documentation & Wiki](https://lunarclient.dev/apollo/introduction) +- [Downloads](https://lunarclient.dev/apollo/downloads) +- [Maven Repository](https://lunarclient.dev/maven-repository) + +## Integration + +### API Integration +Use the **Apollo API** directly by depending on it from our [Maven repository](https://lunarclient.dev/maven-repository). +This is the most straightforward way to create plugins and modules that communicate with Lunar Client. + +See the [Waypoint module integration guide](https://lunarclient.dev/apollo/developers/modules/waypoint#integration) for a complete example. + +### Lightweight Integration +Our **Lightweight integration** allows you to use Apollo features **without running the Apollo plugin**. +This is useful for developers who want Apollo functionality but prefer a more minimal approach. + +There are two supported methods: +- [Lightweight JSON](https://lunarclient.dev/apollo/developers/lightweight/json/getting-started) +- [Lightweight Protobuf](https://lunarclient.dev/apollo/developers/lightweight/protobuf/getting-started) + +Both approaches achieve the same goal, but with different trade-offs in terms of **complexity and flexibility**. + +Read the [Lightweight introduction](https://lunarclient.dev/apollo/developers/lightweight/introduction) documentation to get started. + +## Examples + +Apollo includes example plugins to help you get started quickly. +These are the **same projects used for the code examples in the official documentation** on [lunarclient.dev](https://lunarclient.dev/apollo/introduction/). + +Each module page on the documentation site shows how to use **API**, **Lightweight JSON**, and **Lightweight Protobuf** integrations, with code pulled directly from these projects. + +### Bukkit +- API example → `example/bukkit/api/build/libs` +- Lightweight JSON example → `example/bukkit/json/build/libs` +- Lightweight Protobuf example → `example/bukkit/protos/build/libs` + +### Minestom +- API example server → `example/minestom/api/build/libs` + +## Building + +Apollo uses [Gradle](https://gradle.org/) to handle dependencies and compile the project. + +**Prerequisites** + +- Java 8 JDK +- Build Tools for Spigot 1.8.8 + +**Compiling** + +Running the following will compile the Apollo source for Java 8. + +```shell +./gradlew build +``` + +The compiled jars will be available in build/libs for each platform: + +- Bukkit: `platform/bukkit/plugin/build/libs` +- Folia: `platform/folia/build/libs` +- Minestom: `platform/minestom/build/libs` +- BungeeCord: `platform/bungee/build/libs` +- Velocity: `platform/velocity/build/libs` + +## Contributing + +The Apollo project is split into several modules. + +- **API** - The publicly available interface for developers wishing to create custom integrations with Lunar Client. +- **Common** - The abstraction used by platform modules to reduce duplicate code and implement the protocol for Lunar Client. +- **Bukkit, Folia, Minestom, BungeeCord, Velocity** - Are modules that implement the common module for each respective platform. + +Contributions can be made to Apollo by creating a pull request for improvements or fixes. For new feature ideas please consider making a +suggestion by creating an [issue](https://github.com/LunarClient/Apollo/issues) or joining our [discord](https://lunarclient.dev/discord). + +## License + +Apollo is licensed under the [MIT license](https://github.com/LunarClient/Apollo/blob/master/license.txt). diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d3e7fcab2..344b9d67c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,13 +26,6 @@ jobs: distribution: "zulu" java-version: 8 - - name: Setup BuildTools - run: | - mkdir ~/buildtools - cd ~/buildtools - wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar - java -jar BuildTools.jar --rev 1.8.8 - - name: Gradle Build run: ./gradlew build @@ -62,8 +55,8 @@ jobs: target_commitish: "${{ github.sha }}" generate_release_notes: true files: | - bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar - bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar - velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar - folia/build/libs/apollo-folia-${{ env.VERSION }}.jar - minestom/build/libs/apollo-minestom-${{ env.VERSION }}.jar + platform/bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar + platform/bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar + platform/velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar + platform/folia/build/libs/apollo-folia-${{ env.VERSION }}.jar + platform/minestom/build/libs/apollo-minestom-${{ env.VERSION }}.jar diff --git a/README.md b/README.md deleted file mode 100644 index bbcce3e32..000000000 --- a/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Apollo -[![Discord](https://img.shields.io/discord/1080556677004271666?logo=discord&label=discord)](https://lunarclient.dev/discord) - -Apollo is a powerful tool that allows developers to create custom integrations with Lunar Client. - -You can find the latest downloads, wiki, and more at [lunarclient.dev](https://lunarclient.dev/apollo/introduction). - -Creating custom integrations for Apollo requires adding the Apollo API as a dependency from our [maven repository](https://lunarclient.dev/maven-repository) -to your project. - -## Building - -Apollo uses [Gradle](https://gradle.org/) to handle dependencies and compile the project. - -**Prerequisites** - -- Java 8 JDK -- Build Tools for Spigot 1.8.8 - -**Compiling** - -Running the following will compile the Apollo source for Java 8. - -```shell -./gradlew build -``` -The output jars can be found in the `build/libs` directory relative to each platform. - -- Bukkit: `bukkit/plugin/build/libs` -- Folia: `folia/build/libs` -- Minestom: `minestom/build/libs` -- BungeeCord: `bungee/build/libs` -- Velocity: `velocity/build/libs` - -## Examples - -An example plugin can be compiled to provide a variety of commands that allow you to try different features Apollo provides. -When compiled the output jar can be found in the directory `bukkit/example/build/libs`. - -## Contributing - -The Apollo project is split into several modules. - -- **API** - The publicly available interface for developers wishing to create custom integrations with Lunar Client. -- **Common** - The abstraction used by platform modules to reduce duplicate code and implement the protocol for Lunar Client. -- **Bukkit, Folia, Minestom, BungeeCord, Velocity** - Are modules that implement the common module for each respective platform. - -Contributions can be made to Apollo by creating a pull request for improvements or fixes. For new feature ideas please consider making a -suggestion by creating an [issue](https://github.com/LunarClient/Apollo/issues) or joining our [discord](https://lunarclient.dev/discord). - -## License - -Apollo is licensed under the [MIT license](https://github.com/LunarClient/Apollo/blob/master/license.txt). diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 26b1ad762..1ba14cb83 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -20,7 +20,6 @@ dependencies { "bukkit"(main.output) "bukkit"(libs.bukkit.api) - "bukkit"(libs.bukkit) "bungee"(main.output) "bungee"(libs.bungee) diff --git a/api/src/main/java/com/lunarclient/apollo/event/modsetting/ApolloUpdateModOptionEvent.java b/api/src/main/java/com/lunarclient/apollo/event/modsetting/ApolloUpdateModOptionEvent.java new file mode 100644 index 000000000..069458c18 --- /dev/null +++ b/api/src/main/java/com/lunarclient/apollo/event/modsetting/ApolloUpdateModOptionEvent.java @@ -0,0 +1,64 @@ +/* + * 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.event.modsetting; + +import com.lunarclient.apollo.event.Event; +import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.player.ApolloPlayer; +import lombok.Value; +import org.jetbrains.annotations.Nullable; + +/** + * Represents an event that is fired when an option is updated. + * + * @since 1.2.1 + */ +@Value +public class ApolloUpdateModOptionEvent implements Event { + + /** + * The {@link ApolloPlayer} that the option was updated for. + * + * @return the player + * @since 1.2.1 + */ + ApolloPlayer player; + + /** + * The {@link Option} that was updated. + * + * @return the option + * @since 1.2.1 + */ + Option option; + + /** + * The new value of the option. + * + * @return the new value + * @since 1.2.1 + */ + @Nullable Object value; + +} diff --git a/api/src/main/java/com/lunarclient/apollo/event/player/ApolloPlayerHandshakeEvent.java b/api/src/main/java/com/lunarclient/apollo/event/player/ApolloPlayerHandshakeEvent.java index 43061554e..69aa276d3 100644 --- a/api/src/main/java/com/lunarclient/apollo/event/player/ApolloPlayerHandshakeEvent.java +++ b/api/src/main/java/com/lunarclient/apollo/event/player/ApolloPlayerHandshakeEvent.java @@ -27,6 +27,7 @@ import com.lunarclient.apollo.client.version.LunarClientVersion; import com.lunarclient.apollo.client.version.MinecraftVersion; import com.lunarclient.apollo.event.Event; +import com.lunarclient.apollo.module.paynow.PayNowEmbeddedCheckoutSupport; import com.lunarclient.apollo.module.tebex.TebexEmbeddedCheckoutSupport; import com.lunarclient.apollo.player.ApolloPlayer; import java.util.List; @@ -80,4 +81,12 @@ public class ApolloPlayerHandshakeEvent implements Event { */ TebexEmbeddedCheckoutSupport tebexEmbeddedCheckoutSupport; + /** + * The {@link PayNowEmbeddedCheckoutSupport} type. + * + * @return the Pay Now checkout support type + * @since 1.2.1 + */ + PayNowEmbeddedCheckoutSupport payNowEmbeddedCheckoutSupport; + } diff --git a/api/src/main/java/com/lunarclient/apollo/mods/Mods.java b/api/src/main/java/com/lunarclient/apollo/mods/Mods.java index 13590e31f..ab9ed46fb 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/Mods.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/Mods.java @@ -26,6 +26,7 @@ import com.lunarclient.apollo.mods.impl.Mod2dItems; import com.lunarclient.apollo.mods.impl.Mod3dSkins; import com.lunarclient.apollo.mods.impl.ModArmorstatus; +import com.lunarclient.apollo.mods.impl.ModAudioSubtitles; import com.lunarclient.apollo.mods.impl.ModAutoTextActions; import com.lunarclient.apollo.mods.impl.ModAutoTextHotkey; import com.lunarclient.apollo.mods.impl.ModBlockOutline; @@ -63,6 +64,7 @@ import com.lunarclient.apollo.mods.impl.ModMemory; import com.lunarclient.apollo.mods.impl.ModMenuBlur; import com.lunarclient.apollo.mods.impl.ModMinimap; +import com.lunarclient.apollo.mods.impl.ModMobSize; import com.lunarclient.apollo.mods.impl.ModMomentum; import com.lunarclient.apollo.mods.impl.ModMotionBlur; import com.lunarclient.apollo.mods.impl.ModMumbleLink; @@ -81,6 +83,7 @@ import com.lunarclient.apollo.mods.impl.ModRadio; import com.lunarclient.apollo.mods.impl.ModReachDisplay; import com.lunarclient.apollo.mods.impl.ModReplaymod; +import com.lunarclient.apollo.mods.impl.ModRewind; import com.lunarclient.apollo.mods.impl.ModSaturation; import com.lunarclient.apollo.mods.impl.ModSba; import com.lunarclient.apollo.mods.impl.ModScoreboard; @@ -202,8 +205,11 @@ public final class Mods { ModHurtCam.class, ModTierTagger.class, ModDamageTint.class, + ModMobSize.class, ModSkyblock.class, ModHorseStats.class, + ModRewind.class, + ModAudioSubtitles.class, ModKillSounds.class, ModInventoryMod.class, ModRadio.class diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod2dItems.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod2dItems.java index 6537d7ce4..e234ff2eb 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod2dItems.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod2dItems.java @@ -40,6 +40,7 @@ public final class Mod2dItems { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("2d-items", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod3dSkins.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod3dSkins.java index 79b1b4867..839feed6e 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod3dSkins.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/Mod3dSkins.java @@ -41,6 +41,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("3d-skins", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class Mod3dSkins { public static final NumberOption RENDER_DISTANCE_LOD = NumberOption.number() .node("3d-skins", "render-distance-lod").type(TypeToken.get(Integer.class)) .min(5).max(40) + .defaultValue(14) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class Mod3dSkins { */ public static final SimpleOption SHOW_OTHERS = SimpleOption.builder() .node("3d-skins", "show-others").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -72,6 +75,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_HAT = SimpleOption.builder() .node("3d-skins", "enable-hat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -82,6 +86,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_JACKET = SimpleOption.builder() .node("3d-skins", "enable-jacket").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -92,6 +97,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_LEFT_SLEEVE = SimpleOption.builder() .node("3d-skins", "enable-left-sleeve").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -102,6 +108,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_RIGHT_SLEEVE = SimpleOption.builder() .node("3d-skins", "enable-right-sleeve").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -112,6 +119,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_LEFT_PANTS = SimpleOption.builder() .node("3d-skins", "enable-left-pants").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -122,6 +130,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_RIGHT_PANTS = SimpleOption.builder() .node("3d-skins", "enable-right-pants").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -133,6 +142,7 @@ public final class Mod3dSkins { public static final NumberOption BASE_VOXEL_SIZE = NumberOption.number() .node("3d-skins", "base-voxel-size").type(TypeToken.get(Float.class)) .min(1.001F).max(1.4F) + .defaultValue(1.15F) .notifyClient() .build(); @@ -144,6 +154,7 @@ public final class Mod3dSkins { public static final NumberOption BODY_VOXEL_WIDTH_SIZE = NumberOption.number() .node("3d-skins", "body-voxel-width-size").type(TypeToken.get(Float.class)) .min(1.001F).max(1.4F) + .defaultValue(1.05F) .notifyClient() .build(); @@ -155,6 +166,7 @@ public final class Mod3dSkins { public static final NumberOption HEAD_VOXEL_SIZE = NumberOption.number() .node("3d-skins", "head-voxel-size").type(TypeToken.get(Float.class)) .min(1.001F).max(1.25F) + .defaultValue(1.18F) .notifyClient() .build(); @@ -166,6 +178,7 @@ public final class Mod3dSkins { public static final NumberOption FIRST_PERSON_VOXEL_SIZE = NumberOption.number() .node("3d-skins", "first-person-voxel-size").type(TypeToken.get(Float.class)) .min(1.001F).max(1.3F) + .defaultValue(1.1F) .notifyClient() .build(); @@ -176,6 +189,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_SKULLS = SimpleOption.builder() .node("3d-skins", "enable-skulls").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -186,6 +200,7 @@ public final class Mod3dSkins { */ public static final SimpleOption ENABLE_SKULLS_ITEMS = SimpleOption.builder() .node("3d-skins", "enable-skulls-items").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -197,6 +212,7 @@ public final class Mod3dSkins { public static final NumberOption SKULL_VOXEL_SIZE = NumberOption.number() .node("3d-skins", "skull-voxel-size").type(TypeToken.get(Float.class)) .min(1.001F).max(1.2F) + .defaultValue(1.1F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModArmorstatus.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModArmorstatus.java index b209e1807..2e521b3dc 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModArmorstatus.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModArmorstatus.java @@ -42,6 +42,7 @@ public final class ModArmorstatus { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("armorstatus", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModArmorstatus { */ public static final NumberOption SCALE = NumberOption.number() .node("armorstatus", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModArmorstatus { */ public static final SimpleOption MOVE_ARMOR_INDIVIDUALLY = SimpleOption.builder() .node("armorstatus", "move-armor-individually").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModArmorstatus { */ public static final SimpleOption HIDE_UNBREAKABLE_DURABILITY = SimpleOption.builder() .node("armorstatus", "hide-unbreakable-durability").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModArmorstatus { */ public static final SimpleOption ITEM_NAME = SimpleOption.builder() .node("armorstatus", "item-name").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -93,6 +98,7 @@ public final class ModArmorstatus { */ public static final SimpleOption ITEM_COUNT = SimpleOption.builder() .node("armorstatus", "item-count").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -103,16 +109,19 @@ public final class ModArmorstatus { */ public static final SimpleOption SHOW_WHILE_TYPING = SimpleOption.builder() .node("armorstatus", "show-while-typing").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("armorstatus", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -123,6 +132,7 @@ public final class ModArmorstatus { */ public static final SimpleOption DAMAGE_OVERLAY = SimpleOption.builder() .node("armorstatus", "damage-overlay").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -133,6 +143,7 @@ public final class ModArmorstatus { */ public static final SimpleOption ITEM_DAMAGE = SimpleOption.builder() .node("armorstatus", "item-damage").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -143,6 +154,7 @@ public final class ModArmorstatus { */ public static final SimpleOption ARMOR_DAMAGE = SimpleOption.builder() .node("armorstatus", "armor-damage").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -153,6 +165,7 @@ public final class ModArmorstatus { */ public static final SimpleOption MAX_DAMAGE = SimpleOption.builder() .node("armorstatus", "max-damage").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -163,6 +176,7 @@ public final class ModArmorstatus { */ public static final SimpleOption STATIC_DAMAGE_COLORS = SimpleOption.builder() .node("armorstatus", "static-damage-colors").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -173,6 +187,7 @@ public final class ModArmorstatus { */ public static final SimpleOption NAME_TEXT_COLOR = SimpleOption.builder() .node("armorstatus", "name-text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -183,6 +198,7 @@ public final class ModArmorstatus { */ public static final SimpleOption HIGHEST_COLOR = SimpleOption.builder() .node("armorstatus", "highest-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -193,6 +209,7 @@ public final class ModArmorstatus { */ public static final SimpleOption HIGH_COLOR = SimpleOption.builder() .node("armorstatus", "high-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(85, 255, 85)) .notifyClient() .build(); @@ -203,6 +220,7 @@ public final class ModArmorstatus { */ public static final SimpleOption MEDIUM_COLOR = SimpleOption.builder() .node("armorstatus", "medium-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); @@ -213,6 +231,7 @@ public final class ModArmorstatus { */ public static final SimpleOption MEDIUM_LOW_COLOR = SimpleOption.builder() .node("armorstatus", "medium-low-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 170, 0)) .notifyClient() .build(); @@ -223,6 +242,7 @@ public final class ModArmorstatus { */ public static final SimpleOption LOW_COLOR = SimpleOption.builder() .node("armorstatus", "low-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 85, 85)) .notifyClient() .build(); @@ -233,6 +253,7 @@ public final class ModArmorstatus { */ public static final SimpleOption LOWEST_COLOR = SimpleOption.builder() .node("armorstatus", "lowest-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(170, 0, 0)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAudioSubtitles.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAudioSubtitles.java new file mode 100644 index 000000000..6417131a7 --- /dev/null +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAudioSubtitles.java @@ -0,0 +1,143 @@ +/* + * 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.mods.impl; + +import com.lunarclient.apollo.option.NumberOption; +import com.lunarclient.apollo.option.SimpleOption; +import io.leangen.geantyref.TypeToken; +import java.awt.Color; + +/** + * Allows you to customize Minecraft's audio subtitles, if enabled. + * + * @since 1.2.1 + */ +public final class ModAudioSubtitles { + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ENABLED = SimpleOption.builder() + .node("audio-subtitles", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final NumberOption SCALE = NumberOption.number() + .node("audio-subtitles", "scale").type(TypeToken.get(Float.class)) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. + * + * @since 1.2.1 + */ + public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") + .node("audio-subtitles", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption BACKGROUND = SimpleOption.builder() + .node("audio-subtitles", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption BORDER = SimpleOption.builder() + .node("audio-subtitles", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final NumberOption BORDER_THICKNESS = NumberOption.number() + .node("audio-subtitles", "border-thickness").type(TypeToken.get(Float.class)) + .min(0.5F).max(3.0F) + .defaultValue(0.5F) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption BORDER_COLOR = SimpleOption.builder() + .node("audio-subtitles", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() + .node("audio-subtitles", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 204)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption TEXT_COLOR = SimpleOption.builder() + .node("audio-subtitles", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) + .notifyClient() + .build(); + + private ModAudioSubtitles() { + } + +} diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextActions.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextActions.java index 2f5b70729..dddbd4845 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextActions.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextActions.java @@ -40,6 +40,7 @@ public final class ModAutoTextActions { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("auto-text-actions", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextHotkey.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextHotkey.java index b23395040..c710daf9c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextHotkey.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModAutoTextHotkey.java @@ -40,6 +40,7 @@ public final class ModAutoTextHotkey { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("auto-text-hotkey", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModAutoTextHotkey { public static final SimpleOption NOTIFY_ON_BLOCKED_INPUT = SimpleOption.builder() .comment("Displays a notification when an input is blocked by the server") .node("auto-text-hotkey", "notify-on-blocked-input").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBlockOutline.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBlockOutline.java index ad8c8deae..4fdd2fec1 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBlockOutline.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBlockOutline.java @@ -42,6 +42,7 @@ public final class ModBlockOutline { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("block-outline", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModBlockOutline { */ public static final SimpleOption BLOCK_OUTLINE = SimpleOption.builder() .node("block-outline", "block-outline").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModBlockOutline { public static final NumberOption BLOCK_OUTLINE_WIDTH = NumberOption.number() .node("block-outline", "block-outline-width").type(TypeToken.get(Float.class)) .min(1.0F).max(10.0F) + .defaultValue(2.0F) .notifyClient() .build(); @@ -74,6 +77,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_COLOR = SimpleOption.builder() .comment("Primary block outline color") .node("block-outline", "block-outline-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 102)) .notifyClient() .build(); @@ -85,6 +89,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_COLOR_END = SimpleOption.builder() .comment("Secondary block outline color") .node("block-outline", "block-outline-color-end").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 102)) .notifyClient() .build(); @@ -96,6 +101,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_INTERPOLATE_ALPHA = SimpleOption.builder() .comment("If the transparency should also blend between both outline colors") .node("block-outline", "block-outline-interpolate-alpha").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -107,6 +113,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_ACCURATE = SimpleOption.builder() .comment("If the exact block bounding box should be used, this comes at a slight performance cost") .node("block-outline", "block-outline-accurate").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -118,6 +125,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_TRAVERSAL = SimpleOption.builder() .comment("If the outline colors should travel through the block") .node("block-outline", "block-outline-traversal").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -129,6 +137,7 @@ public final class ModBlockOutline { public static final NumberOption BLOCK_OUTLINE_TRAVERSAL_SPEED = NumberOption.number() .node("block-outline", "block-outline-traversal-speed").type(TypeToken.get(Float.class)) .min(0.15F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -139,6 +148,7 @@ public final class ModBlockOutline { */ public static final SimpleOption BLOCK_OVERLAY = SimpleOption.builder() .node("block-outline", "block-overlay").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -150,6 +160,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OVERLAY_COLOR = SimpleOption.builder() .comment("Primary block overlay color") .node("block-outline", "block-overlay-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 26)) .notifyClient() .build(); @@ -161,6 +172,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OVERLAY_COLOR_END = SimpleOption.builder() .comment("Secondary block overlay color") .node("block-outline", "block-overlay-color-end").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 26)) .notifyClient() .build(); @@ -172,6 +184,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OVERLAY_INTERPOLATE_ALPHA = SimpleOption.builder() .comment("If the transparency should also blend between both overlay colors") .node("block-outline", "block-overlay-interpolate-alpha").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -183,6 +196,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OVERLAY_ACCURATE = SimpleOption.builder() .comment("If the exact block bounding box should be used, this comes at a slight performance cost") .node("block-outline", "block-overlay-accurate").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -194,6 +208,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OVERLAY_TRAVERSAL = SimpleOption.builder() .comment("If the overlay colors should travel through the block") .node("block-outline", "block-overlay-traversal").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -205,6 +220,7 @@ public final class ModBlockOutline { public static final NumberOption BLOCK_OVERLAY_TRAVERSAL_SPEED = NumberOption.number() .node("block-outline", "block-overlay-traversal-speed").type(TypeToken.get(Float.class)) .min(0.15F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -216,6 +232,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_SIDE = SimpleOption.builder() .comment("If only a single side of the block should have outlines") .node("block-outline", "block-outline-side").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -227,6 +244,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_SHOW_HIDDEN_FOLIAGE = SimpleOption.builder() .comment("If using hide foliage, should outlines still show on foliage") .node("block-outline", "block-outline-show-hidden-foliage").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -238,6 +256,7 @@ public final class ModBlockOutline { public static final SimpleOption BLOCK_OUTLINE_MULTI_BLOCK = SimpleOption.builder() .comment("If blocks that connect together should share an outline") .node("block-outline", "block-outline-multi-block").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -249,6 +268,7 @@ public final class ModBlockOutline { public static final SimpleOption SHOW_IN_SPECTATOR = SimpleOption.builder() .comment("If outlines should be visible in spectator mode") .node("block-outline", "show-in-spectator").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBossbar.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBossbar.java index 40d01e508..b68f7d235 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBossbar.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModBossbar.java @@ -42,6 +42,7 @@ public final class ModBossbar { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("bossbar", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModBossbar { public static final NumberOption SCALE = NumberOption.number() .node("bossbar", "scale").type(TypeToken.get(Float.class)) .min(0.5F).max(1.5F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModBossbar { */ public static final SimpleOption RENDER_BAR = SimpleOption.builder() .node("bossbar", "render-bar").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModBossbar { */ public static final SimpleOption RENDER_BOSS_TEXT = SimpleOption.builder() .node("bossbar", "render-boss-text").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModBossbar { */ public static final SimpleOption CUSTOM_BOSS_BAR = SimpleOption.builder() .node("bossbar", "custom-boss-bar").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -93,6 +98,7 @@ public final class ModBossbar { */ public static final SimpleOption BAR_COLOR = SimpleOption.builder() .node("bossbar", "bar-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(242, 73, 242)) .notifyClient() .build(); @@ -103,6 +109,7 @@ public final class ModBossbar { */ public static final SimpleOption USE_MINECRAFT_GUISCALE = SimpleOption.builder() .node("bossbar", "use-minecraft-g-u-i-scale").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChat.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChat.java index 8eaf51f3a..14462bcd1 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChat.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChat.java @@ -41,6 +41,7 @@ public final class ModChat { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("chat", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModChat { public static final SimpleOption UNLIMITED_CHAT = SimpleOption.builder() .comment("Choose whether or not you want to increase the message history in chat") .node("chat", "unlimited-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModChat { */ public static final SimpleOption MODERN_CHAT_LENGTH_HYPIXEL = SimpleOption.builder() .node("chat", "modern-chat-length-hypixel").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -72,6 +75,7 @@ public final class ModChat { */ public static final SimpleOption LONG_CHAT_SINGLEPLAYER = SimpleOption.builder() .node("chat", "long-chat-singleplayer").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModChat { public static final SimpleOption STACK_MESSAGES = SimpleOption.builder() .comment("Choose whether or not you want to stack multiple of the same messages in chat") .node("chat", "stack-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -94,6 +99,7 @@ public final class ModChat { public static final SimpleOption STACK_MESSAGES_TIME_BASED = SimpleOption.builder() .comment("Choose whether or not you want to stack multiple of the same messages in chat within a timeframe") .node("chat", "stack-messages-time-based").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -105,6 +111,7 @@ public final class ModChat { public static final NumberOption TIME_BASED_STACK_MESSAGES_TIMEFRAME = NumberOption.number() .node("chat", "time-based-stack-messages-timeframe").type(TypeToken.get(Integer.class)) .min(1).max(60) + .defaultValue(10) .notifyClient() .build(); @@ -115,6 +122,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_STACK_IGNORE_BLANK = SimpleOption.builder() .node("chat", "chat-stack-ignore-blank").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -125,6 +133,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_STACK_IGNORE_BREAK = SimpleOption.builder() .node("chat", "chat-stack-ignore-break").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -136,6 +145,7 @@ public final class ModChat { public static final SimpleOption CHAT_HEIGHT = SimpleOption.builder() .comment("Moves the chat up 12 pixels so it doesn't block health bar") .node("chat", "chat-height").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -147,6 +157,7 @@ public final class ModChat { public static final SimpleOption CHAT_SHADOW = SimpleOption.builder() .comment("Show text shadow on chat lines") .node("chat", "chat-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -157,6 +168,7 @@ public final class ModChat { */ public static final SimpleOption DISABLE_CHAT = SimpleOption.builder() .node("chat", "disable-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -167,6 +179,7 @@ public final class ModChat { */ public static final SimpleOption NO_CLOSE_MY_CHAT = SimpleOption.builder() .node("chat", "no-close-my-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -177,6 +190,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_PING_SOUND = SimpleOption.builder() .node("chat", "chat-ping-sound").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -188,6 +202,7 @@ public final class ModChat { public static final SimpleOption CHAT_PING_EXACT_MATCH = SimpleOption.builder() .comment("Requires the ping message to exactly contain your name.For example, if your name is Notch, this will ping on Notch but not Notch123.") .node("chat", "chat-ping-exact-match").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -199,6 +214,7 @@ public final class ModChat { public static final SimpleOption COPY_CHAT = SimpleOption.builder() .comment("Copies the hovered chat message when holding the keybind and clicking.") .node("chat", "copy-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -210,6 +226,7 @@ public final class ModChat { public static final SimpleOption HOVER_IMAGE_PREVIEW = SimpleOption.builder() .comment("Displays a preview of an image when hovering over it.If a single message has more than one image, press CTRL to cycle through them.") .node("chat", "hover-image-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -222,6 +239,7 @@ public final class ModChat { .comment("The minimum size for an image to be displayed, as a percentage of your screen.") .node("chat", "min-image-size").type(TypeToken.get(Double.class)) .min(0.0D).max(100.0D) + .defaultValue(0.0D) .notifyClient() .build(); @@ -234,6 +252,7 @@ public final class ModChat { .comment("The maximum size for an image to be displayed, as a percentage of your screen.") .node("chat", "max-image-size").type(TypeToken.get(Double.class)) .min(0.0D).max(100.0D) + .defaultValue(30.0D) .notifyClient() .build(); @@ -245,6 +264,7 @@ public final class ModChat { public static final SimpleOption FULLSCREEN_IMAGE = SimpleOption.builder() .comment("When your max image size is set to e.g. 50%, when you press shift, the image will expand to 100%") .node("chat", "fullscreen-image").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -255,6 +275,7 @@ public final class ModChat { */ public static final SimpleOption SMOOTH_CHAT = SimpleOption.builder() .node("chat", "smooth-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -266,6 +287,7 @@ public final class ModChat { public static final NumberOption SMOOTH_CHAT_SPEED = NumberOption.number() .node("chat", "smooth-chat-speed").type(TypeToken.get(Integer.class)) .min(1).max(10) + .defaultValue(3) .notifyClient() .build(); @@ -276,6 +298,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_NAME_BOLD = SimpleOption.builder() .node("chat", "chat-name-bold").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -286,6 +309,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_NAME_ITALIC = SimpleOption.builder() .node("chat", "chat-name-italic").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -296,6 +320,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_NAME_UNDERLINE = SimpleOption.builder() .node("chat", "chat-name-underline").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -306,6 +331,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_NAME_STRIKETHROUGH = SimpleOption.builder() .node("chat", "chat-name-strikethrough").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -316,6 +342,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_NAME_OBFUSCATED = SimpleOption.builder() .node("chat", "chat-name-obfuscated").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -327,6 +354,7 @@ public final class ModChat { public static final NumberOption CHAT_BACKGROUND_OPACITY = NumberOption.number() .node("chat", "chat-background-opacity").type(TypeToken.get(Float.class)) .min(0.0F).max(1.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -338,6 +366,7 @@ public final class ModChat { public static final NumberOption INPUT_FIELD_OPACITY = NumberOption.number() .node("chat", "input-field-opacity").type(TypeToken.get(Float.class)) .min(0.0F).max(10.0F) + .defaultValue(5.0F) .notifyClient() .build(); @@ -349,6 +378,7 @@ public final class ModChat { public static final SimpleOption STOP_PROFANE_MESSAGES = SimpleOption.builder() .comment("ENABLED: Completely hides filtered messages DISABLED: Replaces filtered words with asterisks") .node("chat", "stop-profane-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -359,6 +389,7 @@ public final class ModChat { */ public static final SimpleOption CHAT_TIMESTAMPS = SimpleOption.builder() .node("chat", "chat-timestamps").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -370,6 +401,7 @@ public final class ModChat { public static final SimpleOption TIMESTAMP_ITALICS = SimpleOption.builder() .comment("Makes the timestamp italics") .node("chat", "timestamp-italics").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -381,6 +413,7 @@ public final class ModChat { public static final SimpleOption TIMESTAMP_BOLD = SimpleOption.builder() .comment("Makes the timestamp bold") .node("chat", "timestamp-bold").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -392,6 +425,7 @@ public final class ModChat { public static final SimpleOption TWELVE_HOUR_CLOCK = SimpleOption.builder() .comment("Use a 12-hour clock, or a 24-hour clock if disabled") .node("chat", "twelve-hour-clock").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -402,6 +436,7 @@ public final class ModChat { */ public static final SimpleOption SHOW_AM_PM = SimpleOption.builder() .node("chat", "show-am-pm").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -412,6 +447,7 @@ public final class ModChat { */ public static final SimpleOption SHOW_SECONDS = SimpleOption.builder() .node("chat", "show-seconds").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -423,6 +459,7 @@ public final class ModChat { public static final SimpleOption SHOW_BRACKETS = SimpleOption.builder() .comment("Adds square brackets around the timestamp") .node("chat", "show-brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChunkBorders.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChunkBorders.java index 05322d646..fe6bf6376 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChunkBorders.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModChunkBorders.java @@ -41,6 +41,7 @@ public final class ModChunkBorders { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("chunk-borders", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModChunkBorders { */ public static final SimpleOption GRID_COLOR = SimpleOption.builder() .node("chunk-borders", "grid-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 0)) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModChunkBorders { */ public static final SimpleOption INNER_CHUNK_CORNER_COLOR = SimpleOption.builder() .node("chunk-borders", "inner-chunk-corner-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 255)) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModChunkBorders { */ public static final SimpleOption OUTER_CHUNK_CORNER_COLOR = SimpleOption.builder() .node("chunk-borders", "outer-chunk-corner-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 0, 0)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModClock.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModClock.java index 1e9d2c0c6..6257b4b5d 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModClock.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModClock.java @@ -42,6 +42,7 @@ public final class ModClock { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("clock", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModClock { */ public static final NumberOption SCALE = NumberOption.number() .node("clock", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -61,8 +63,32 @@ public final class ModClock { * * @since 1.0.0 */ + public static final SimpleOption MILITARY_TIME = SimpleOption.builder() + .node("clock", "military-time").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.3 + */ + public static final SimpleOption SHOW_AM_PM = SimpleOption.builder() + .node("clock", "show-am-pm").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. + * + * @since 1.0.0 + */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("clock", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +99,7 @@ public final class ModClock { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("clock", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +110,7 @@ public final class ModClock { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("clock", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +121,7 @@ public final class ModClock { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("clock", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +133,7 @@ public final class ModClock { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("clock", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +145,7 @@ public final class ModClock { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("clock", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +157,7 @@ public final class ModClock { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("clock", "background-width").type(TypeToken.get(Integer.class)) .min(46).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +169,7 @@ public final class ModClock { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("clock", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +180,7 @@ public final class ModClock { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("clock", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +192,7 @@ public final class ModClock { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("clock", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +203,7 @@ public final class ModClock { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("clock", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +214,7 @@ public final class ModClock { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("clock", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,26 +225,7 @@ public final class ModClock { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("clock", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption MILITARY_TIME = SimpleOption.builder() - .node("clock", "military-time").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.3 - */ - public static final SimpleOption SHOW_AM_PM = SimpleOption.builder() - .node("clock", "show-am-pm").type(TypeToken.get(Boolean.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModColorSaturation.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModColorSaturation.java index dfa7d73d2..780d6c7df 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModColorSaturation.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModColorSaturation.java @@ -41,6 +41,7 @@ public final class ModColorSaturation { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("color-saturation", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModColorSaturation { public static final NumberOption COLOR_SATURATION_HUE = NumberOption.number() .node("color-saturation", "color-saturation-hue").type(TypeToken.get(Float.class)) .min(0.0F).max(10.0F) + .defaultValue(0.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModColorSaturation { public static final NumberOption COLOR_SATURATION_SATURATION = NumberOption.number() .node("color-saturation", "color-saturation-saturation").type(TypeToken.get(Float.class)) .min(0.0F).max(10.0F) + .defaultValue(5.0F) .notifyClient() .build(); @@ -74,6 +77,7 @@ public final class ModColorSaturation { public static final NumberOption COLOR_SATURATION_BRIGHTNESS = NumberOption.number() .node("color-saturation", "color-saturation-brightness").type(TypeToken.get(Float.class)) .min(0.0F).max(10.0F) + .defaultValue(5.0F) .notifyClient() .build(); @@ -85,6 +89,7 @@ public final class ModColorSaturation { public static final NumberOption COLOR_SATURATION_CONTRAST = NumberOption.number() .node("color-saturation", "color-saturation-contrast").type(TypeToken.get(Float.class)) .min(0.0F).max(10.0F) + .defaultValue(5.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCombo.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCombo.java index db3d956f6..01b918abb 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCombo.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCombo.java @@ -42,6 +42,7 @@ public final class ModCombo { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("combo", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,20 @@ public final class ModCombo { */ public static final NumberOption SCALE = NumberOption.number() .node("combo", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("combo", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +77,7 @@ public final class ModCombo { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("combo", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +88,7 @@ public final class ModCombo { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("combo", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +99,7 @@ public final class ModCombo { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("combo", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +111,7 @@ public final class ModCombo { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("combo", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +123,7 @@ public final class ModCombo { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("combo", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +135,7 @@ public final class ModCombo { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("combo", "background-width").type(TypeToken.get(Integer.class)) .min(46).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +147,7 @@ public final class ModCombo { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("combo", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +158,7 @@ public final class ModCombo { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("combo", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +170,7 @@ public final class ModCombo { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("combo", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +181,7 @@ public final class ModCombo { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("combo", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +192,7 @@ public final class ModCombo { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("combo", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,6 +203,7 @@ public final class ModCombo { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("combo", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCooldowns.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCooldowns.java index d41cb9a27..d3fd8ef69 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCooldowns.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCooldowns.java @@ -41,6 +41,7 @@ public final class ModCooldowns { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("cooldowns", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,7 +52,8 @@ public final class ModCooldowns { */ public static final NumberOption SCALE = NumberOption.number() .node("cooldowns", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCoordinates.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCoordinates.java index e1c803ba7..452c3acec 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCoordinates.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCoordinates.java @@ -42,6 +42,7 @@ public final class ModCoordinates { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("coordinates", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,17 +53,20 @@ public final class ModCoordinates { */ public static final NumberOption SCALE = NumberOption.number() .node("coordinates", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("coordinates", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +77,7 @@ public final class ModCoordinates { */ public static final SimpleOption SHOW_WHILE_TYPING = SimpleOption.builder() .node("coordinates", "show-while-typing").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +88,7 @@ public final class ModCoordinates { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("coordinates", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -93,6 +99,7 @@ public final class ModCoordinates { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("coordinates", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -104,6 +111,7 @@ public final class ModCoordinates { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("coordinates", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -114,6 +122,7 @@ public final class ModCoordinates { */ public static final SimpleOption MOVE_CHILDREN_INDIVIDUALLY = SimpleOption.builder() .node("coordinates", "move-children-individually").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -124,6 +133,7 @@ public final class ModCoordinates { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("coordinates", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -134,6 +144,7 @@ public final class ModCoordinates { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("coordinates", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCps.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCps.java index fc7ea7355..0c711a7c0 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCps.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCps.java @@ -42,6 +42,7 @@ public final class ModCps { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("cps", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModCps { */ public static final NumberOption SCALE = NumberOption.number() .node("cps", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -61,8 +63,65 @@ public final class ModCps { * * @since 1.0.0 */ + public static final SimpleOption RIGHT_CLICK = SimpleOption.builder() + .node("cps", "right-click").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.0.0 + */ + public static final SimpleOption LINE_COLOR = SimpleOption.builder() + .node("cps", "line-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(32, 32, 32)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.0.0 + */ + public static final SimpleOption SHOW_CPSTEXT = SimpleOption.builder() + .node("cps", "show-c-p-s-text").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.8 + */ + public static final SimpleOption REVERSE_TEXT = SimpleOption.builder() + .node("cps", "reverse-text").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.8 + */ + public static final SimpleOption IGNORE_CANCELLED_CLICKS = SimpleOption.builder() + .node("cps", "ignore-cancelled-clicks").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. + * + * @since 1.0.0 + */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("cps", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +132,7 @@ public final class ModCps { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("cps", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +143,7 @@ public final class ModCps { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("cps", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +154,7 @@ public final class ModCps { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("cps", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +166,7 @@ public final class ModCps { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("cps", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +178,7 @@ public final class ModCps { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("cps", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +190,7 @@ public final class ModCps { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("cps", "background-width").type(TypeToken.get(Integer.class)) .min(40).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +202,7 @@ public final class ModCps { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("cps", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +213,7 @@ public final class ModCps { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("cps", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +225,7 @@ public final class ModCps { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("cps", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +236,7 @@ public final class ModCps { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("cps", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +247,7 @@ public final class ModCps { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("cps", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,56 +258,7 @@ public final class ModCps { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("cps", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption RIGHT_CLICK = SimpleOption.builder() - .node("cps", "right-click").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption LINE_COLOR = SimpleOption.builder() - .node("cps", "line-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption SHOW_CPSTEXT = SimpleOption.builder() - .node("cps", "show-c-p-s-text").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.8 - */ - public static final SimpleOption REVERSE_TEXT = SimpleOption.builder() - .node("cps", "reverse-text").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.8 - */ - public static final SimpleOption IGNORE_CANCELLED_CLICKS = SimpleOption.builder() - .node("cps", "ignore-cancelled-clicks").type(TypeToken.get(Boolean.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCrosshair.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCrosshair.java index e5b115461..5492235d7 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCrosshair.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModCrosshair.java @@ -42,6 +42,7 @@ public final class ModCrosshair { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("crosshair", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModCrosshair { public static final NumberOption CROSSHAIR_THICKNESS = NumberOption.number() .node("crosshair", "crosshair-thickness").type(TypeToken.get(Integer.class)) .min(1).max(5) + .defaultValue(1) .notifyClient() .build(); @@ -64,6 +66,7 @@ public final class ModCrosshair { public static final NumberOption CROSSHAIR_SIZE = NumberOption.number() .node("crosshair", "crosshair-size").type(TypeToken.get(Integer.class)) .min(0).max(8) + .defaultValue(4) .notifyClient() .build(); @@ -75,6 +78,7 @@ public final class ModCrosshair { public static final NumberOption CROSSHAIR_GAP = NumberOption.number() .node("crosshair", "crosshair-gap").type(TypeToken.get(Integer.class)) .min(0).max(8) + .defaultValue(0) .notifyClient() .build(); @@ -85,6 +89,7 @@ public final class ModCrosshair { */ public static final SimpleOption CROSSHAIR_DOT = SimpleOption.builder() .node("crosshair", "crosshair-dot").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -95,6 +100,7 @@ public final class ModCrosshair { */ public static final SimpleOption CROSSHAIR_OUTLINE = SimpleOption.builder() .node("crosshair", "crosshair-outline").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -106,6 +112,7 @@ public final class ModCrosshair { public static final NumberOption OUTLINE_THICKNESS = NumberOption.number() .node("crosshair", "outline-thickness").type(TypeToken.get(Float.class)) .min(0.0F).max(1.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -116,6 +123,7 @@ public final class ModCrosshair { */ public static final SimpleOption OUTLINE_COLOR = SimpleOption.builder() .node("crosshair", "outline-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 136)) .notifyClient() .build(); @@ -126,6 +134,7 @@ public final class ModCrosshair { */ public static final SimpleOption CUSTOM_SCALE = SimpleOption.builder() .node("crosshair", "custom-scale").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -136,6 +145,7 @@ public final class ModCrosshair { */ public static final SimpleOption COLOR = SimpleOption.builder() .node("crosshair", "color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -146,6 +156,7 @@ public final class ModCrosshair { */ public static final SimpleOption FRIENDLY_COLOR = SimpleOption.builder() .node("crosshair", "friendly-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(51, 255, 51)) .notifyClient() .build(); @@ -156,6 +167,7 @@ public final class ModCrosshair { */ public static final SimpleOption ENEMY_COLOR = SimpleOption.builder() .node("crosshair", "enemy-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 51, 51)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDamageTint.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDamageTint.java index 7d91f6b1b..079052b13 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDamageTint.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDamageTint.java @@ -42,6 +42,7 @@ public final class ModDamageTint { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("damage-tint", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModDamageTint { */ public static final SimpleOption VIGNETTE_COLOR = SimpleOption.builder() .node("damage-tint", "vignette-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 0, 0)) .notifyClient() .build(); @@ -64,6 +66,7 @@ public final class ModDamageTint { .comment("Intensity of the tint.") .node("damage-tint", "vignette-intensity").type(TypeToken.get(Float.class)) .min(0.0F).max(1.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -76,6 +79,7 @@ public final class ModDamageTint { .comment("Show the tint when you have less than this amount of health as a percentage.") .node("damage-tint", "show-vignette-below").type(TypeToken.get(Integer.class)) .min(0).max(100) + .defaultValue(100) .notifyClient() .build(); @@ -87,6 +91,7 @@ public final class ModDamageTint { public static final SimpleOption HEARTBEAT_AUDIO = SimpleOption.builder() .comment("Plays a heartbeat, becoming faster the lower your health.") .node("damage-tint", "heartbeat-audio").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDayCounter.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDayCounter.java index 757ba4e3e..5c82312bc 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDayCounter.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDayCounter.java @@ -42,6 +42,7 @@ public final class ModDayCounter { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("day-counter", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,32 @@ public final class ModDayCounter { */ public static final NumberOption SCALE = NumberOption.number() .node("day-counter", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * If enabled, this will show the day of the world. If disabled, it will display your playtime in that world. + * + * @since 1.0.0 + */ + public static final SimpleOption USE_WORLD_TYPE = SimpleOption.builder() + .comment("If enabled, this will show the day of the world. If disabled, it will display your playtime in that world.") + .node("day-counter", "use-world-type").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("day-counter", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +89,7 @@ public final class ModDayCounter { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("day-counter", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +100,7 @@ public final class ModDayCounter { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("day-counter", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +111,7 @@ public final class ModDayCounter { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("day-counter", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +123,7 @@ public final class ModDayCounter { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("day-counter", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +135,7 @@ public final class ModDayCounter { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("day-counter", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +147,7 @@ public final class ModDayCounter { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("day-counter", "background-width").type(TypeToken.get(Integer.class)) .min(46).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +159,7 @@ public final class ModDayCounter { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("day-counter", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +170,7 @@ public final class ModDayCounter { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("day-counter", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +182,7 @@ public final class ModDayCounter { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("day-counter", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +193,7 @@ public final class ModDayCounter { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("day-counter", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +204,7 @@ public final class ModDayCounter { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("day-counter", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,17 +215,7 @@ public final class ModDayCounter { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("day-counter", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * If enabled, this will show the day of the world. If disabled, it will display your playtime in that world. - * - * @since 1.0.0 - */ - public static final SimpleOption USE_WORLD_TYPE = SimpleOption.builder() - .comment("If enabled, this will show the day of the world. If disabled, it will display your playtime in that world.") - .node("day-counter", "use-world-type").type(TypeToken.get(Boolean.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDirectionHud.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDirectionHud.java index 7bd0226b8..2f41ea379 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDirectionHud.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModDirectionHud.java @@ -42,6 +42,7 @@ public final class ModDirectionHud { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("direction-hud", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModDirectionHud { */ public static final NumberOption SCALE = NumberOption.number() .node("direction-hud", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -64,16 +66,19 @@ public final class ModDirectionHud { public static final NumberOption WIDTH = NumberOption.number() .node("direction-hud", "width").type(TypeToken.get(Float.class)) .min(168.0F).max(448.0F) + .defaultValue(280.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("direction-hud", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -85,6 +90,7 @@ public final class ModDirectionHud { public static final SimpleOption BOLD_DIRECTIONS = SimpleOption.builder() .comment("Show the cardinal directions in BOLD.") .node("direction-hud", "bold-directions").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -95,6 +101,7 @@ public final class ModDirectionHud { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("direction-hud", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -105,6 +112,7 @@ public final class ModDirectionHud { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("direction-hud", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -116,6 +124,7 @@ public final class ModDirectionHud { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("direction-hud", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -126,6 +135,7 @@ public final class ModDirectionHud { */ public static final SimpleOption SHOW_MARKER = SimpleOption.builder() .node("direction-hud", "show-marker").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -136,6 +146,7 @@ public final class ModDirectionHud { */ public static final SimpleOption SHOW_MARKER_VALUE = SimpleOption.builder() .node("direction-hud", "show-marker-value").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -146,6 +157,7 @@ public final class ModDirectionHud { */ public static final SimpleOption USE_LEGACY_STYLE = SimpleOption.builder() .node("direction-hud", "use-legacy-style").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -157,6 +169,7 @@ public final class ModDirectionHud { public static final SimpleOption SHOW_WITH_TAB = SimpleOption.builder() .comment("Choose whether to show the Direction HUD when TAB is open.") .node("direction-hud", "show-with-tab").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -167,6 +180,7 @@ public final class ModDirectionHud { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("direction-hud", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -177,6 +191,7 @@ public final class ModDirectionHud { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("direction-hud", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -187,6 +202,7 @@ public final class ModDirectionHud { */ public static final SimpleOption MARKER_COLOR = SimpleOption.builder() .node("direction-hud", "marker-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -197,6 +213,7 @@ public final class ModDirectionHud { */ public static final SimpleOption DIRECTION_COLOR = SimpleOption.builder() .node("direction-hud", "direction-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFog.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFog.java index e2d78da65..b699abb42 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFog.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFog.java @@ -42,6 +42,7 @@ public final class ModFog { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("fog", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModFog { public static final NumberOption WATER_FOG_DENSITY = NumberOption.number() .node("fog", "water-fog-density").type(TypeToken.get(Float.class)) .min(0.0F).max(1.8F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -64,6 +66,31 @@ public final class ModFog { public static final NumberOption RENDER_DISTANCE_FOG_DENSITY = NumberOption.number() .node("fog", "render-distance-fog-density").type(TypeToken.get(Float.class)) .min(0.0F).max(1.95F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final NumberOption ATMOSPHERIC_FOG_DENSITY = NumberOption.number() + .node("fog", "atmospheric-fog-density").type(TypeToken.get(Float.class)) + .min(0.0F).max(1.95F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final NumberOption DIMENSION_FOG_DENSITY = NumberOption.number() + .node("fog", "dimension-fog-density").type(TypeToken.get(Float.class)) + .min(0.0F).max(1.95F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -74,6 +101,7 @@ public final class ModFog { */ public static final SimpleOption RENDER_DISTANCE_FOG_COLOR_TOGGLE = SimpleOption.builder() .node("fog", "render-distance-fog-color-toggle").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -84,6 +112,51 @@ public final class ModFog { */ public static final SimpleOption RENDER_DISTANCE_FOG_COLOR = SimpleOption.builder() .node("fog", "render-distance-fog-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(192, 216, 255, 0)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ATMOSPHERIC_FOG_COLOR_TOGGLE = SimpleOption.builder() + .node("fog", "atmospheric-fog-color-toggle").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ATMOSPHERIC_FOG_COLOR = SimpleOption.builder() + .node("fog", "atmospheric-fog-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(192, 208, 255, 0)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption DIMENSION_FOG_COLOR_TOGGLE = SimpleOption.builder() + .node("fog", "dimension-fog-color-toggle").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption DIMENSION_FOG_COLOR = SimpleOption.builder() + .node("fog", "dimension-fog-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(192, 208, 255, 0)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFov.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFov.java index 3635bf2aa..91fc9473c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFov.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFov.java @@ -41,6 +41,7 @@ public final class ModFov { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("fov", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModFov { public static final SimpleOption STATIC_FOV = SimpleOption.builder() .comment("Determines if your FOV changes as you move.") .node("fov", "static-f-o-v").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModFov { public static final NumberOption DEFAULT_FOV = NumberOption.number() .node("fov", "default-fov").type(TypeToken.get(Integer.class)) .min(30).max(110) + .defaultValue(70) .notifyClient() .build(); @@ -74,6 +77,7 @@ public final class ModFov { public static final NumberOption AIMING_MODIFIER = NumberOption.number() .node("fov", "aiming-modifier").type(TypeToken.get(Float.class)) .min(0.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -85,6 +89,7 @@ public final class ModFov { public static final NumberOption AIMING_MIN = NumberOption.number() .node("fov", "aiming-min").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(-10.0F) .notifyClient() .build(); @@ -96,6 +101,7 @@ public final class ModFov { public static final NumberOption AIMING_MAX = NumberOption.number() .node("fov", "aiming-max").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(10.0F) .notifyClient() .build(); @@ -107,6 +113,7 @@ public final class ModFov { public static final NumberOption SPEED_FOV = NumberOption.number() .node("fov", "speed-f-o-v").type(TypeToken.get(Integer.class)) .min(30).max(110) + .defaultValue(70) .notifyClient() .build(); @@ -118,6 +125,7 @@ public final class ModFov { public static final NumberOption SPEED_TWO_FOV = NumberOption.number() .node("fov", "speed-two-f-o-v").type(TypeToken.get(Integer.class)) .min(30).max(110) + .defaultValue(70) .notifyClient() .build(); @@ -129,6 +137,7 @@ public final class ModFov { public static final NumberOption SLOWNESS_FOV = NumberOption.number() .node("fov", "slowness-f-o-v").type(TypeToken.get(Integer.class)) .min(30).max(110) + .defaultValue(70) .notifyClient() .build(); @@ -140,6 +149,7 @@ public final class ModFov { public static final NumberOption MOVEMENT_MODIFIER = NumberOption.number() .node("fov", "movement-modifier").type(TypeToken.get(Float.class)) .min(0.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -151,6 +161,7 @@ public final class ModFov { public static final NumberOption MOVEMENT_MIN = NumberOption.number() .node("fov", "movement-min").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(-10.0F) .notifyClient() .build(); @@ -162,6 +173,7 @@ public final class ModFov { public static final NumberOption MOVEMENT_MAX = NumberOption.number() .node("fov", "movement-max").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(10.0F) .notifyClient() .build(); @@ -173,6 +185,7 @@ public final class ModFov { public static final NumberOption SPRINTING_FOV = NumberOption.number() .node("fov", "sprinting-f-o-v").type(TypeToken.get(Integer.class)) .min(30).max(110) + .defaultValue(70) .notifyClient() .build(); @@ -184,6 +197,7 @@ public final class ModFov { public static final NumberOption SPRINT_MODIFIER = NumberOption.number() .node("fov", "sprint-modifier").type(TypeToken.get(Float.class)) .min(0.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -195,6 +209,7 @@ public final class ModFov { public static final NumberOption SPRINT_MIN = NumberOption.number() .node("fov", "sprint-min").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(-10.0F) .notifyClient() .build(); @@ -206,6 +221,7 @@ public final class ModFov { public static final NumberOption SPRINT_MAX = NumberOption.number() .node("fov", "sprint-max").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(10.0F) .notifyClient() .build(); @@ -217,6 +233,7 @@ public final class ModFov { public static final NumberOption FLYING_FOV = NumberOption.number() .node("fov", "flying-fov").type(TypeToken.get(Integer.class)) .min(30).max(110) + .defaultValue(70) .notifyClient() .build(); @@ -228,6 +245,7 @@ public final class ModFov { public static final NumberOption FLYING_MODIFIER = NumberOption.number() .node("fov", "flying-modifier").type(TypeToken.get(Float.class)) .min(0.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -239,6 +257,7 @@ public final class ModFov { public static final NumberOption FLYING_MIN = NumberOption.number() .node("fov", "flying-min").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(-10.0F) .notifyClient() .build(); @@ -250,6 +269,7 @@ public final class ModFov { public static final NumberOption FLYING_MAX = NumberOption.number() .node("fov", "flying-max").type(TypeToken.get(Float.class)) .min(-200.0F).max(200.0F) + .defaultValue(10.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFps.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFps.java index 767cfe957..f6be0d841 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFps.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFps.java @@ -42,6 +42,7 @@ public final class ModFps { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("fps", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,20 @@ public final class ModFps { */ public static final NumberOption SCALE = NumberOption.number() .node("fps", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("fps", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +77,7 @@ public final class ModFps { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("fps", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +88,7 @@ public final class ModFps { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("fps", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +99,7 @@ public final class ModFps { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("fps", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +111,7 @@ public final class ModFps { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("fps", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +123,7 @@ public final class ModFps { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("fps", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +135,7 @@ public final class ModFps { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("fps", "background-width").type(TypeToken.get(Integer.class)) .min(50).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +147,7 @@ public final class ModFps { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("fps", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +158,7 @@ public final class ModFps { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("fps", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +170,7 @@ public final class ModFps { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("fps", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +181,7 @@ public final class ModFps { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("fps", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +192,7 @@ public final class ModFps { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("fps", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,6 +203,7 @@ public final class ModFps { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("fps", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFreelook.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFreelook.java index 7e3d780df..052f61b4f 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFreelook.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModFreelook.java @@ -40,6 +40,7 @@ public final class ModFreelook { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("freelook", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModFreelook { */ public static final SimpleOption INVERT_PITCH = SimpleOption.builder() .node("freelook", "invert-pitch").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -60,6 +62,7 @@ public final class ModFreelook { */ public static final SimpleOption INVERT_YAW = SimpleOption.builder() .node("freelook", "invert-yaw").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModFreelook { public static final SimpleOption TOGGLE_KEY_FREELOOK = SimpleOption.builder() .comment("Quickly pressing and releasing the key will toggle freelook") .node("freelook", "toggle-key-freelook").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -82,6 +86,7 @@ public final class ModFreelook { public static final SimpleOption SMOOTH_CAMERA = SimpleOption.builder() .comment("When zoomed in the camera movement will move smoothly (cinematic camera)") .node("freelook", "smooth-camera").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModGlintColorizer.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModGlintColorizer.java index afe5cf044..93658486c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModGlintColorizer.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModGlintColorizer.java @@ -41,6 +41,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("glint-colorizer", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption SHOW_GLINT = SimpleOption.builder() .node("glint-colorizer", "show-glint").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModGlintColorizer { public static final SimpleOption USE_LUNAR_EQUATION = SimpleOption.builder() .comment("Use a custom blending algorithm which supports darker colours") .node("glint-colorizer", "use-lunar-equation").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModGlintColorizer { public static final SimpleOption OVERRIDE_ITEM_GLINT = SimpleOption.builder() .comment("Recolor the glints of items") .node("glint-colorizer", "override-item-glint").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption ITEM_GLINT_LUNAR_COLOR = SimpleOption.builder() .node("glint-colorizer", "item-glint-lunar-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(100, 25, 255, 204)) .notifyClient() .build(); @@ -93,6 +98,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption ITEM_GLINT_VANILLA_COLOR = SimpleOption.builder() .node("glint-colorizer", "item-glint-vanilla-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(128, 64, 204)) .notifyClient() .build(); @@ -104,6 +110,7 @@ public final class ModGlintColorizer { public static final SimpleOption OVERRIDE_ARMOR_GLINT = SimpleOption.builder() .comment("Recolor the glints of worn armor") .node("glint-colorizer", "override-armor-glint").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -114,6 +121,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption ARMOR_GLINT_LUNAR = SimpleOption.builder() .node("glint-colorizer", "armor-glint-lunar").type(TypeToken.get(Color.class)) + .defaultValue(new Color(100, 25, 255, 204)) .notifyClient() .build(); @@ -124,6 +132,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption ARMOR_GLINT_VANILLA = SimpleOption.builder() .node("glint-colorizer", "armor-glint-vanilla").type(TypeToken.get(Color.class)) + .defaultValue(new Color(128, 64, 204)) .notifyClient() .build(); @@ -134,6 +143,7 @@ public final class ModGlintColorizer { */ public static final SimpleOption GLINT_COLOR = SimpleOption.builder() .node("glint-colorizer", "glint-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(128, 64, 204)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitColor.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitColor.java index b1ccbd813..135ebccd6 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitColor.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitColor.java @@ -41,6 +41,7 @@ public final class ModHitColor { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("hit-color", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModHitColor { */ public static final SimpleOption HIT_ARMOR_COLOR = SimpleOption.builder() .node("hit-color", "hit-armor-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(153, 0, 0, 102)) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModHitColor { */ public static final SimpleOption SHOULD_COLOR_ARMOR = SimpleOption.builder() .node("hit-color", "should-color-armor").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitbox.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitbox.java index 442b47cd6..e6f3b035a 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitbox.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHitbox.java @@ -42,6 +42,7 @@ public final class ModHitbox { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("hitbox", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModHitbox { public static final NumberOption HITBOX_PLAYER_LINE_WIDTH = NumberOption.number() .node("hitbox", "hitbox-player-line-width").type(TypeToken.get(Float.class)) .min(1.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_PLAYER_LINE_COLOR = SimpleOption.builder() .node("hitbox", "hitbox-player-line-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_PLAYER_LOOK_VECTOR = SimpleOption.builder() .node("hitbox", "hitbox-player-look-vector").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_PLAYER_SHOW = SimpleOption.builder() .node("hitbox", "hitbox-player-show").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -94,6 +99,7 @@ public final class ModHitbox { public static final NumberOption HITBOX_ITEM_LINE_WIDTH = NumberOption.number() .node("hitbox", "hitbox-item-line-width").type(TypeToken.get(Float.class)) .min(1.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -104,6 +110,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_ITEM_LINE_COLOR = SimpleOption.builder() .node("hitbox", "hitbox-item-line-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -114,6 +121,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_ITEM_LOOK_VECTOR = SimpleOption.builder() .node("hitbox", "hitbox-item-look-vector").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -124,6 +132,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_ITEM_SHOW = SimpleOption.builder() .node("hitbox", "hitbox-item-show").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -135,6 +144,7 @@ public final class ModHitbox { public static final NumberOption HITBOX_PROJECTILE_LINE_WIDTH = NumberOption.number() .node("hitbox", "hitbox-projectile-line-width").type(TypeToken.get(Float.class)) .min(1.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -145,6 +155,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_PROJECTILE_LINE_COLOR = SimpleOption.builder() .node("hitbox", "hitbox-projectile-line-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -155,6 +166,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_PROJECTILE_LOOK_VECTOR = SimpleOption.builder() .node("hitbox", "hitbox-projectile-look-vector").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -165,6 +177,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_PROJECTILE_SHOW = SimpleOption.builder() .node("hitbox", "hitbox-projectile-show").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -176,6 +189,7 @@ public final class ModHitbox { public static final NumberOption HITBOX_MOB_LINE_WIDTH = NumberOption.number() .node("hitbox", "hitbox-mob-line-width").type(TypeToken.get(Float.class)) .min(1.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -186,6 +200,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_MOB_LINE_COLOR = SimpleOption.builder() .node("hitbox", "hitbox-mob-line-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -196,6 +211,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_MOB_LOOK_VECTOR = SimpleOption.builder() .node("hitbox", "hitbox-mob-look-vector").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -206,6 +222,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_MOB_SHOW = SimpleOption.builder() .node("hitbox", "hitbox-mob-show").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -217,6 +234,7 @@ public final class ModHitbox { public static final NumberOption HITBOX_EXP_ORB_LINE_WIDTH = NumberOption.number() .node("hitbox", "hitbox-exp-orb-line-width").type(TypeToken.get(Float.class)) .min(1.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -227,6 +245,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_EXP_ORB_LINE_COLOR = SimpleOption.builder() .node("hitbox", "hitbox-exp-orb-line-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -237,6 +256,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_EXP_ORB_LOOK_VECTOR = SimpleOption.builder() .node("hitbox", "hitbox-exp-orb-look-vector").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -247,6 +267,7 @@ public final class ModHitbox { */ public static final SimpleOption HITBOX_EXP_ORB_SHOW = SimpleOption.builder() .node("hitbox", "hitbox-exp-orb-show").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHorseStats.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHorseStats.java index 08ad474ca..cf4e8ece9 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHorseStats.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHorseStats.java @@ -41,6 +41,7 @@ public final class ModHorseStats { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("horse-stats", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModHorseStats { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("horse-stats", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(64, 64, 64)) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModHorseStats { */ public static final SimpleOption SPEED_COLOR = SimpleOption.builder() .node("horse-stats", "speed-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(45, 104, 207)) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModHorseStats { */ public static final SimpleOption JUMP_COLOR = SimpleOption.builder() .node("horse-stats", "jump-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(18, 175, 13)) .notifyClient() .build(); @@ -81,6 +85,7 @@ public final class ModHorseStats { */ public static final SimpleOption HEALTH_COLOR = SimpleOption.builder() .node("horse-stats", "health-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(207, 45, 45)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHurtCam.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHurtCam.java index c9236c2de..11c712a18 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHurtCam.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHurtCam.java @@ -41,6 +41,7 @@ public final class ModHurtCam { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("hurt-cam", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModHurtCam { */ public static final SimpleOption DISABLE_HURT_CAM = SimpleOption.builder() .node("hurt-cam", "disable-hurt-cam").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModHurtCam { public static final NumberOption HURT_SHAKING_INTENSITY = NumberOption.number() .node("hurt-cam", "hurt-shaking-intensity").type(TypeToken.get(Float.class)) .min(0.0F).max(2.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -72,6 +75,7 @@ public final class ModHurtCam { */ public static final SimpleOption OLD_CAMERA_TILT = SimpleOption.builder() .node("hurt-cam", "old-camera-tilt").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelBedwars.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelBedwars.java index 4604526bb..06e85ffa9 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelBedwars.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelBedwars.java @@ -25,6 +25,7 @@ import com.lunarclient.apollo.option.SimpleOption; import io.leangen.geantyref.TypeToken; +import java.awt.Color; /** * Various enhancements to assist you when playing Hypixel Bedwars. @@ -40,6 +41,7 @@ public final class ModHypixelBedwars { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("hypixel-bedwars", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +53,19 @@ public final class ModHypixelBedwars { public static final SimpleOption COLORED_BEDS = SimpleOption.builder() .comment("Recolor the beds in-game according to the team's color") .node("hypixel-bedwars", "colored-beds").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * Recolor the beds in bedwars practice mode. + * + * @since 1.2.1 + */ + public static final SimpleOption ENABLE_PRACTICE_COLOR = SimpleOption.builder() + .comment("Recolor the beds in bedwars practice mode") + .node("hypixel-bedwars", "enable-practice-color").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -62,6 +77,51 @@ public final class ModHypixelBedwars { public static final SimpleOption BW_HARDCORE_HEARTS = SimpleOption.builder() .comment("Replaces normal hearts with hardcore hearts once your bed is lost") .node("hypixel-bedwars", "bw-hardcore-hearts").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption CUSTOM_TRAP_ALERT = SimpleOption.builder() + .node("hypixel-bedwars", "custom-trap-alert").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption MUTE_ALERT_SOUND = SimpleOption.builder() + .node("hypixel-bedwars", "mute-alert-sound").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ALERT_PRIMARY_COLOR = SimpleOption.builder() + .node("hypixel-bedwars", "alert-primary-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ALERT_SUB_COLOR = SimpleOption.builder() + .node("hypixel-bedwars", "alert-sub-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelMod.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelMod.java index 1edc0fccd..1329126a9 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelMod.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModHypixelMod.java @@ -41,6 +41,7 @@ public final class ModHypixelMod { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("hypixel-mod", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModHypixelMod { */ public static final SimpleOption REMOVE_GUILD_ON_TAB = SimpleOption.builder() .node("hypixel-mod", "remove-guild-on-tab").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModHypixelMod { */ public static final SimpleOption REMOVE_GUILD_MOTD = SimpleOption.builder() .node("hypixel-mod", "remove-guild-motd").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModHypixelMod { */ public static final SimpleOption SHORT_CHANNEL_NAMES = SimpleOption.builder() .node("hypixel-mod", "short-channel-names").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -81,6 +85,7 @@ public final class ModHypixelMod { */ public static final SimpleOption AUTO_FRIEND = SimpleOption.builder() .node("hypixel-mod", "auto-friend").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -91,6 +96,7 @@ public final class ModHypixelMod { */ public static final SimpleOption AUTO_TIP = SimpleOption.builder() .node("hypixel-mod", "auto-tip").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -101,6 +107,7 @@ public final class ModHypixelMod { */ public static final SimpleOption AUTO_GG = SimpleOption.builder() .node("hypixel-mod", "auto-g-g").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -111,6 +118,7 @@ public final class ModHypixelMod { */ public static final SimpleOption ANTI_GG = SimpleOption.builder() .node("hypixel-mod", "anti-g-g").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -121,6 +129,7 @@ public final class ModHypixelMod { */ public static final SimpleOption AUTO_WHO = SimpleOption.builder() .node("hypixel-mod", "auto-who").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -131,6 +140,7 @@ public final class ModHypixelMod { */ public static final SimpleOption LEVEL_HEAD = SimpleOption.builder() .node("hypixel-mod", "level-head").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -141,6 +151,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HYPIXEL_AUTOCOMPLETE = SimpleOption.builder() .node("hypixel-mod", "hypixel-autocomplete").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -151,6 +162,7 @@ public final class ModHypixelMod { */ public static final SimpleOption LEVEL_COLOR = SimpleOption.builder() .node("hypixel-mod", "level-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); @@ -161,6 +173,7 @@ public final class ModHypixelMod { */ public static final SimpleOption LEVEL_HEAD_NUMBER_COLOR = SimpleOption.builder() .node("hypixel-mod", "level-head-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(85, 255, 255)) .notifyClient() .build(); @@ -171,6 +184,7 @@ public final class ModHypixelMod { */ public static final SimpleOption LEVEL_ABOVE = SimpleOption.builder() .node("hypixel-mod", "level-above").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -181,6 +195,7 @@ public final class ModHypixelMod { */ public static final SimpleOption USE_BEDWARS_LEVELS_FORMAT = SimpleOption.builder() .node("hypixel-mod", "use-bedwars-levels-format").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -191,6 +206,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_PRIVATE_MESSAGES = SimpleOption.builder() .node("hypixel-mod", "hide-private-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -201,6 +217,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_TEAM_CHAT = SimpleOption.builder() .node("hypixel-mod", "hide-team-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -211,6 +228,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_PARTY_CHAT = SimpleOption.builder() .node("hypixel-mod", "hide-party-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -221,6 +239,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_GUILD_CHAT = SimpleOption.builder() .node("hypixel-mod", "hide-guild-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -231,6 +250,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_SHOUT = SimpleOption.builder() .node("hypixel-mod", "hide-shout").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -241,6 +261,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_SPECTATOR_CHAT = SimpleOption.builder() .node("hypixel-mod", "hide-spectator-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -251,6 +272,7 @@ public final class ModHypixelMod { */ public static final SimpleOption REMOVE_LOBBY_STATUSES = SimpleOption.builder() .node("hypixel-mod", "remove-lobby-statuses").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -261,6 +283,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_JOIN_MESSAGES = SimpleOption.builder() .node("hypixel-mod", "hide-join-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -271,6 +294,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_LEAVE_MESSAGES = SimpleOption.builder() .node("hypixel-mod", "hide-leave-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -281,6 +305,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_SOUL_WELL_ANNOUNCEMENTS = SimpleOption.builder() .node("hypixel-mod", "hide-soul-well-announcements").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -291,6 +316,7 @@ public final class ModHypixelMod { */ public static final SimpleOption HIDE_MYSTERY_BOX_ANNOUNCEMENTS = SimpleOption.builder() .node("hypixel-mod", "hide-mystery-box-announcements").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModInventoryMod.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModInventoryMod.java index 64e50262b..d93df0c7d 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModInventoryMod.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModInventoryMod.java @@ -41,6 +41,7 @@ public final class ModInventoryMod { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("inventory-mod", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModInventoryMod { public static final SimpleOption DONT_RESET_CURSOR = SimpleOption.builder() .comment("Useful for navigating inventory menus on servers.") .node("inventory-mod", "dont-reset-cursor").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModInventoryMod { public static final NumberOption RESET_CURSOR_TIMEOUT = NumberOption.number() .node("inventory-mod", "reset-cursor-timeout").type(TypeToken.get(Float.class)) .min(0.1F).max(5.0F) + .defaultValue(0.3F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemCounter.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemCounter.java index aafb69c15..7d145ac20 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemCounter.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemCounter.java @@ -41,6 +41,7 @@ public final class ModItemCounter { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("item-counter", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModItemCounter { public static final NumberOption SCALE = NumberOption.number() .node("item-counter", "scale").type(TypeToken.get(Float.class)) .min(0.5F).max(1.5F) + .defaultValue(1.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemPhysics.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemPhysics.java index eb039073b..a206035ff 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemPhysics.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemPhysics.java @@ -41,6 +41,7 @@ public final class ModItemPhysics { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("item-physics", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModItemPhysics { public static final NumberOption ROTATION_SPEED = NumberOption.number() .node("item-physics", "rotation-speed").type(TypeToken.get(Float.class)) .min(0.1F).max(4.0F) + .defaultValue(0.5F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemTracker.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemTracker.java index 854eab169..af51e5f86 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemTracker.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModItemTracker.java @@ -41,6 +41,7 @@ public final class ModItemTracker { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("item-tracker", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,17 +52,20 @@ public final class ModItemTracker { */ public static final NumberOption SCALE = NumberOption.number() .node("item-tracker", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("item-tracker", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -72,6 +76,7 @@ public final class ModItemTracker { */ public static final SimpleOption SKYBLOCK_ONLY = SimpleOption.builder() .node("item-tracker", "skyblock-only").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -84,6 +89,7 @@ public final class ModItemTracker { .comment("How long the text should stay on screen (seconds)") .node("item-tracker", "popup-duration-sec").type(TypeToken.get(Float.class)) .min(0.1F).max(30.0F) + .defaultValue(5.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKeystrokes.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKeystrokes.java index 2da92ff5c..be04bbebc 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKeystrokes.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKeystrokes.java @@ -42,6 +42,7 @@ public final class ModKeystrokes { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("keystrokes", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModKeystrokes { */ public static final NumberOption SCALE = NumberOption.number() .node("keystrokes", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModKeystrokes { */ public static final SimpleOption KEY_STROKES_CLICKS = SimpleOption.builder() .node("keystrokes", "key-strokes-clicks").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModKeystrokes { */ public static final SimpleOption LEFT_CPS = SimpleOption.builder() .node("keystrokes", "left-c-p-s").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModKeystrokes { */ public static final SimpleOption RIGHT_CPS = SimpleOption.builder() .node("keystrokes", "right-c-p-s").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -93,6 +98,7 @@ public final class ModKeystrokes { */ public static final SimpleOption USE_ARROWS = SimpleOption.builder() .node("keystrokes", "use-arrows").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -103,6 +109,7 @@ public final class ModKeystrokes { */ public static final SimpleOption KEY_STROKES_MOVEMENT = SimpleOption.builder() .node("keystrokes", "key-strokes-movement").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -113,16 +120,19 @@ public final class ModKeystrokes { */ public static final SimpleOption KEY_STROKES_SPACEBAR = SimpleOption.builder() .node("keystrokes", "key-strokes-spacebar").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("keystrokes", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -133,6 +143,7 @@ public final class ModKeystrokes { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("keystrokes", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -143,6 +154,7 @@ public final class ModKeystrokes { */ public static final SimpleOption INNER_BORDER = SimpleOption.builder() .node("keystrokes", "inner-border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -153,6 +165,7 @@ public final class ModKeystrokes { */ public static final SimpleOption ANIMATE = SimpleOption.builder() .node("keystrokes", "animate").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -164,6 +177,7 @@ public final class ModKeystrokes { public static final NumberOption DURATION = NumberOption.number() .node("keystrokes", "duration").type(TypeToken.get(Float.class)) .min(0.1F).max(1.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -174,6 +188,7 @@ public final class ModKeystrokes { */ public static final SimpleOption ANIMATE_COLOR = SimpleOption.builder() .node("keystrokes", "animate-color").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -184,6 +199,7 @@ public final class ModKeystrokes { */ public static final SimpleOption ANIMATION_START_COLOR = SimpleOption.builder() .node("keystrokes", "animation-start-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255, 192)) .notifyClient() .build(); @@ -194,6 +210,7 @@ public final class ModKeystrokes { */ public static final SimpleOption ANIMATION_CENTER_COLOR = SimpleOption.builder() .node("keystrokes", "animation-center-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255, 111)) .notifyClient() .build(); @@ -204,6 +221,7 @@ public final class ModKeystrokes { */ public static final SimpleOption ANIMATION_END_COLOR = SimpleOption.builder() .node("keystrokes", "animation-end-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255, 111)) .notifyClient() .build(); @@ -215,6 +233,7 @@ public final class ModKeystrokes { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("keystrokes", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -226,6 +245,7 @@ public final class ModKeystrokes { public static final NumberOption BOX_SIZE = NumberOption.number() .node("keystrokes", "box-size").type(TypeToken.get(Float.class)) .min(10.0F).max(32.0F) + .defaultValue(18.0F) .notifyClient() .build(); @@ -236,6 +256,7 @@ public final class ModKeystrokes { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("keystrokes", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -246,6 +267,7 @@ public final class ModKeystrokes { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("keystrokes", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -256,6 +278,7 @@ public final class ModKeystrokes { */ public static final SimpleOption TEXT_PRESSED_COLOR = SimpleOption.builder() .node("keystrokes", "text-pressed-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0)) .notifyClient() .build(); @@ -266,6 +289,7 @@ public final class ModKeystrokes { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("keystrokes", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -276,6 +300,7 @@ public final class ModKeystrokes { */ public static final SimpleOption BACKGROUND_PRESSED_COLOR = SimpleOption.builder() .node("keystrokes", "background-pressed-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255, 111)) .notifyClient() .build(); @@ -287,6 +312,7 @@ public final class ModKeystrokes { public static final NumberOption KEY_FADE_DELAY = NumberOption.number() .node("keystrokes", "key-fade-delay").type(TypeToken.get(Long.class)) .min(0L).max(500L) + .defaultValue(75L) .notifyClient() .build(); @@ -298,6 +324,7 @@ public final class ModKeystrokes { public static final NumberOption SPACEBAR_THICKNESS = NumberOption.number() .node("keystrokes", "spacebar-thickness").type(TypeToken.get(Float.class)) .min(1.0F).max(4.25F) + .defaultValue(1.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKillSounds.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKillSounds.java index 2bfe7dc8e..c73106102 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKillSounds.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModKillSounds.java @@ -40,6 +40,7 @@ public final class ModKillSounds { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("kill-sounds", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModLighting.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModLighting.java index e30044e9c..f0eca0ca8 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModLighting.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModLighting.java @@ -41,6 +41,7 @@ public final class ModLighting { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("lighting", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModLighting { */ public static final SimpleOption FULL_BRIGHT = SimpleOption.builder() .node("lighting", "full-bright").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModLighting { public static final NumberOption BRIGHTNESS_BOOST = NumberOption.number() .node("lighting", "brightness-boost").type(TypeToken.get(Float.class)) .min(1.0F).max(10.0F) + .defaultValue(1.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMemory.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMemory.java index 2feb08fbb..e6e9f1c36 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMemory.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMemory.java @@ -42,6 +42,7 @@ public final class ModMemory { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("memory", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,75 @@ public final class ModMemory { */ public static final NumberOption SCALE = NumberOption.number() .node("memory", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** * No documentation available. * + * @since 1.1.3 + */ + public static final SimpleOption COLOR_BASED_ON_USAGE = SimpleOption.builder() + .node("memory", "color-based-on-usage").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.3 + */ + public static final SimpleOption LOW_MEM_COLOR = SimpleOption.builder() + .node("memory", "low-mem-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 0, 0)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.3 + */ + public static final SimpleOption MED_MEM_COLOR = SimpleOption.builder() + .node("memory", "med-mem-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 0)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.3 + */ + public static final SimpleOption HIGH_MEM_COLOR = SimpleOption.builder() + .node("memory", "high-mem-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 255, 0)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.0.0 + */ + public static final SimpleOption TEXT_COLOR = SimpleOption.builder() + .node("memory", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. + * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("memory", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +132,7 @@ public final class ModMemory { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("memory", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +143,7 @@ public final class ModMemory { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("memory", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +154,7 @@ public final class ModMemory { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("memory", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +166,7 @@ public final class ModMemory { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("memory", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +178,7 @@ public final class ModMemory { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("memory", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +190,7 @@ public final class ModMemory { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("memory", "background-width").type(TypeToken.get(Integer.class)) .min(46).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +202,7 @@ public final class ModMemory { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("memory", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +213,7 @@ public final class ModMemory { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("memory", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +225,7 @@ public final class ModMemory { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("memory", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +236,7 @@ public final class ModMemory { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("memory", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,56 +247,7 @@ public final class ModMemory { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("memory", "background-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption TEXT_COLOR = SimpleOption.builder() - .node("memory", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.3 - */ - public static final SimpleOption COLOR_BASED_ON_USAGE = SimpleOption.builder() - .node("memory", "color-based-on-usage").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.3 - */ - public static final SimpleOption LOW_MEM_COLOR = SimpleOption.builder() - .node("memory", "low-mem-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.3 - */ - public static final SimpleOption MED_MEM_COLOR = SimpleOption.builder() - .node("memory", "med-mem-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.1.3 - */ - public static final SimpleOption HIGH_MEM_COLOR = SimpleOption.builder() - .node("memory", "high-mem-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMenuBlur.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMenuBlur.java index 403e634bc..675686819 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMenuBlur.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMenuBlur.java @@ -42,6 +42,7 @@ public final class ModMenuBlur { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("menu-blur", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModMenuBlur { public static final NumberOption BLUR_STRENGTH = NumberOption.number() .node("menu-blur", "blur-strength").type(TypeToken.get(Integer.class)) .min(0).max(20) + .defaultValue(4) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModMenuBlur { */ public static final SimpleOption BLUR_LUNAR_TOGGLE = SimpleOption.builder() .node("menu-blur", "blur-lunar-toggle").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModMenuBlur { */ public static final SimpleOption BLUR_LUNAR_BACKGROUND = SimpleOption.builder() .node("menu-blur", "blur-lunar-background").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 0)) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModMenuBlur { */ public static final SimpleOption BLUR_INVENTORY_TOGGLE = SimpleOption.builder() .node("menu-blur", "blur-inventory-toggle").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -93,6 +98,7 @@ public final class ModMenuBlur { */ public static final SimpleOption BLUR_INVENTORY_BACKGROUND = SimpleOption.builder() .node("menu-blur", "blur-inventory-background").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -103,6 +109,7 @@ public final class ModMenuBlur { */ public static final SimpleOption BLUR_PAUSE_TOGGLE = SimpleOption.builder() .node("menu-blur", "blur-pause-toggle").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -113,6 +120,7 @@ public final class ModMenuBlur { */ public static final SimpleOption BLUR_PAUSE_BACKGROUND = SimpleOption.builder() .node("menu-blur", "blur-pause-background").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMinimap.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMinimap.java index dc059f088..37d33b09c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMinimap.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMinimap.java @@ -42,6 +42,7 @@ public final class ModMinimap { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("minimap", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModMinimap { */ public static final NumberOption SCALE = NumberOption.number() .node("minimap", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -64,6 +66,7 @@ public final class ModMinimap { public static final NumberOption MAP_WIDTH = NumberOption.number() .node("minimap", "map-width").type(TypeToken.get(Integer.class)) .min(1).max(16) + .defaultValue(8) .notifyClient() .build(); @@ -75,6 +78,7 @@ public final class ModMinimap { public static final NumberOption MAP_HEIGHT = NumberOption.number() .node("minimap", "map-height").type(TypeToken.get(Integer.class)) .min(1).max(16) + .defaultValue(8) .notifyClient() .build(); @@ -86,6 +90,7 @@ public final class ModMinimap { public static final NumberOption MAP_ZOOM = NumberOption.number() .node("minimap", "map-zoom").type(TypeToken.get(Float.class)) .min(1.0F).max(2.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -96,6 +101,7 @@ public final class ModMinimap { */ public static final SimpleOption ROTATE_WITH_PLAYER = SimpleOption.builder() .node("minimap", "rotate-with-player").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -106,6 +112,7 @@ public final class ModMinimap { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("minimap", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -116,6 +123,7 @@ public final class ModMinimap { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("minimap", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -127,6 +135,7 @@ public final class ModMinimap { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("minimap", "border-thickness").type(TypeToken.get(Float.class)) .min(1.0F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -137,6 +146,7 @@ public final class ModMinimap { */ public static final SimpleOption COMPASS = SimpleOption.builder() .node("minimap", "compass").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -147,6 +157,7 @@ public final class ModMinimap { */ public static final SimpleOption COMPASS_COLOR = SimpleOption.builder() .node("minimap", "compass-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -157,6 +168,7 @@ public final class ModMinimap { */ public static final SimpleOption COMPASS_SHADOW = SimpleOption.builder() .node("minimap", "compass-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -167,6 +179,7 @@ public final class ModMinimap { */ public static final SimpleOption PLAYER_MARKER_COLOR = SimpleOption.builder() .node("minimap", "player-marker-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 255)) .notifyClient() .build(); @@ -178,6 +191,7 @@ public final class ModMinimap { public static final NumberOption PLAYER_MARKER_SIZE = NumberOption.number() .node("minimap", "player-marker-size").type(TypeToken.get(Float.class)) .min(1.0F).max(10.0F) + .defaultValue(5.0F) .notifyClient() .build(); @@ -189,6 +203,7 @@ public final class ModMinimap { public static final NumberOption ENTITY_MARKER_OPACITY = NumberOption.number() .node("minimap", "entity-marker-opacity").type(TypeToken.get(Float.class)) .min(0.0F).max(1.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -200,6 +215,7 @@ public final class ModMinimap { public static final NumberOption ENTITY_MARKER_SIZE = NumberOption.number() .node("minimap", "entity-marker-size").type(TypeToken.get(Float.class)) .min(1.0F).max(10.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -210,6 +226,7 @@ public final class ModMinimap { */ public static final SimpleOption ENTITY_MARKER_SHADOW = SimpleOption.builder() .node("minimap", "entity-marker-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -220,6 +237,7 @@ public final class ModMinimap { */ public static final SimpleOption SHOW_COORDINATES = SimpleOption.builder() .node("minimap", "show-coordinates").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -230,6 +248,7 @@ public final class ModMinimap { */ public static final SimpleOption SHOW_DISTANT_WAYPOINTS = SimpleOption.builder() .node("minimap", "show-distant-waypoints").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMobSize.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMobSize.java new file mode 100644 index 000000000..3937c6eb6 --- /dev/null +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMobSize.java @@ -0,0 +1,101 @@ +/* + * 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.mods.impl; + +import com.lunarclient.apollo.option.NumberOption; +import com.lunarclient.apollo.option.SimpleOption; +import io.leangen.geantyref.TypeToken; + +/** + * Changes the size of mobs. + * + * @since 1.2.1 + */ +public final class ModMobSize { + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ENABLED = SimpleOption.builder() + .node("mob-size", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * Only change player sizes when playing Hypixel SkyBlock. + * + * @since 1.2.1 + */ + public static final SimpleOption PLAYER_SIZE_SKYBLOCK_ONLY = SimpleOption.builder() + .comment("Only change player sizes when playing Hypixel SkyBlock") + .node("mob-size", "player-size-skyblock-only").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * The size of your player. + * + * @since 1.2.1 + */ + public static final NumberOption PLAYER_SIZE = NumberOption.number() + .comment("The size of your player") + .node("mob-size", "player-size").type(TypeToken.get(Float.class)) + .min(0.5F).max(1.0F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * The size of other players. + * + * @since 1.2.1 + */ + public static final NumberOption OTHER_PLAYER_SIZE = NumberOption.number() + .comment("The size of other players") + .node("mob-size", "other-player-size").type(TypeToken.get(Float.class)) + .min(0.5F).max(1.0F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * If the size of NPCs should be changed. + * + * @since 1.2.1 + */ + public static final SimpleOption CHANGE_NPC_SIZE = SimpleOption.builder() + .comment("If the size of NPCs should be changed") + .node("mob-size", "change-npc-size").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + private ModMobSize() { + } + +} diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMomentum.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMomentum.java index bc5e5a40a..593dffb43 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMomentum.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMomentum.java @@ -42,6 +42,7 @@ public final class ModMomentum { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("momentum", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,57 @@ public final class ModMomentum { */ public static final NumberOption SCALE = NumberOption.number() .node("momentum", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * If enabled then Y velocity is not used in the final speed. + * + * @since 1.0.0 + */ + public static final SimpleOption USE_GROUND_SPEED = SimpleOption.builder() + .comment("If enabled then Y velocity is not used in the final speed.") + .node("momentum", "use-ground-speed").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * If this is disabled then instant velocity is used. + * + * @since 1.0.0 + */ + public static final SimpleOption USE_AVERAGE_VELOCITY = SimpleOption.builder() + .comment("If this is disabled then instant velocity is used") + .node("momentum", "use-average-velocity").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * Determines how many times a second velocity is calculated. Lower values will show a smoother velocity. + * + * @since 1.0.0 + */ + public static final NumberOption AVERAGING_PERIOD = NumberOption.number() + .comment("Determines how many times a second velocity is calculated. Lower values will show a smoother velocity") + .node("momentum", "averaging-period").type(TypeToken.get(Integer.class)) + .min(1).max(50) + .defaultValue(8) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("momentum", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +114,7 @@ public final class ModMomentum { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("momentum", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +125,7 @@ public final class ModMomentum { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("momentum", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +136,7 @@ public final class ModMomentum { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("momentum", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +148,7 @@ public final class ModMomentum { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("momentum", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +160,7 @@ public final class ModMomentum { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("momentum", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +172,7 @@ public final class ModMomentum { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("momentum", "background-width").type(TypeToken.get(Integer.class)) .min(50).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +184,7 @@ public final class ModMomentum { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("momentum", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +195,7 @@ public final class ModMomentum { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("momentum", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +207,7 @@ public final class ModMomentum { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("momentum", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +218,7 @@ public final class ModMomentum { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("momentum", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +229,7 @@ public final class ModMomentum { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("momentum", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,40 +240,7 @@ public final class ModMomentum { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("momentum", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * If enabled then Y velocity is not used in the final speed. - * - * @since 1.0.0 - */ - public static final SimpleOption USE_GROUND_SPEED = SimpleOption.builder() - .comment("If enabled then Y velocity is not used in the final speed.") - .node("momentum", "use-ground-speed").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * If this is disabled then instant velocity is used. - * - * @since 1.0.0 - */ - public static final SimpleOption USE_AVERAGE_VELOCITY = SimpleOption.builder() - .comment("If this is disabled then instant velocity is used") - .node("momentum", "use-average-velocity").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * Determines how many times a second velocity is calculated. Lower values will show a smoother velocity. - * - * @since 1.0.0 - */ - public static final NumberOption AVERAGING_PERIOD = NumberOption.number() - .comment("Determines how many times a second velocity is calculated. Lower values will show a smoother velocity") - .node("momentum", "averaging-period").type(TypeToken.get(Integer.class)) - .min(1).max(50) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMotionBlur.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMotionBlur.java index 6477c9edd..6611458da 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMotionBlur.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMotionBlur.java @@ -41,6 +41,7 @@ public final class ModMotionBlur { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("motion-blur", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModMotionBlur { public static final NumberOption VALUE = NumberOption.number() .node("motion-blur", "value").type(TypeToken.get(Integer.class)) .min(1).max(10) + .defaultValue(5) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMumbleLink.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMumbleLink.java index 2dddbe980..ddb5efb5c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMumbleLink.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModMumbleLink.java @@ -40,6 +40,7 @@ public final class ModMumbleLink { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("mumble-link", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNametag.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNametag.java index 296cd935f..b76ff9be8 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNametag.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNametag.java @@ -26,6 +26,7 @@ import com.lunarclient.apollo.option.NumberOption; import com.lunarclient.apollo.option.SimpleOption; import io.leangen.geantyref.TypeToken; +import java.awt.Color; /** * A mod that allows you to modify nametags. @@ -41,6 +42,7 @@ public final class ModNametag { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("nametag", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +53,7 @@ public final class ModNametag { */ public static final SimpleOption NAMETAG_SHADOW = SimpleOption.builder() .node("nametag", "nametag-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -62,6 +65,7 @@ public final class ModNametag { public static final SimpleOption NAMETAG = SimpleOption.builder() .comment("An option to see your own nametag in third person") .node("nametag", "nametag").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +77,18 @@ public final class ModNametag { public static final SimpleOption TOGGLE_NAMETAGS = SimpleOption.builder() .comment("Determines if we should send the message when nametags are toggled.") .node("nametag", "toggle-nametags").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption HIDE_NAMETAGS_IN_F1 = SimpleOption.builder() + .node("nametag", "hide-nametags-in-f1").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -84,6 +100,29 @@ public final class ModNametag { public static final NumberOption NAMETAG_BACKGROUND_OPACITY = NumberOption.number() .node("nametag", "nametag-background-opacity").type(TypeToken.get(Float.class)) .min(0.0F).max(1.0F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption REPLACE_OWN_NAMETAG_COLOR = SimpleOption.builder() + .node("nametag", "replace-own-nametag-color").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption OWN_NAMETAG_COLOR = SimpleOption.builder() + .node("nametag", "own-nametag-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNeu.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNeu.java index af9a5e544..f338d7607 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNeu.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNeu.java @@ -40,6 +40,7 @@ public final class ModNeu { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("neu", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNickHider.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNickHider.java index 20b84b45c..1d7c34172 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNickHider.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModNickHider.java @@ -40,6 +40,7 @@ public final class ModNickHider { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("nick-hider", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModNickHider { */ public static final SimpleOption HIDE_NAME = SimpleOption.builder() .node("nick-hider", "hide-name").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -60,6 +62,7 @@ public final class ModNickHider { */ public static final SimpleOption HIDE_REAL_NAME = SimpleOption.builder() .node("nick-hider", "hide-real-name").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -70,6 +73,7 @@ public final class ModNickHider { */ public static final SimpleOption HIDE_OTHERS_NAMES = SimpleOption.builder() .node("nick-hider", "hide-others-names").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -80,6 +84,7 @@ public final class ModNickHider { */ public static final SimpleOption HIDE_OWN_SKIN = SimpleOption.builder() .node("nick-hider", "hide-own-skin").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -90,6 +95,7 @@ public final class ModNickHider { */ public static final SimpleOption USE_REAL_SKIN = SimpleOption.builder() .node("nick-hider", "use-real-skin").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -100,6 +106,7 @@ public final class ModNickHider { */ public static final SimpleOption HIDE_OTHERS_SKIN = SimpleOption.builder() .node("nick-hider", "hide-others-skin").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModOneSevenVisuals.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModOneSevenVisuals.java index 925ee711a..2d6ab6cfe 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModOneSevenVisuals.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModOneSevenVisuals.java @@ -40,6 +40,7 @@ public final class ModOneSevenVisuals { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("one-seven-visuals", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModOneSevenVisuals { public static final SimpleOption ALWAYS_SWING = SimpleOption.builder() .comment("Provides better visual feedback when attacking while keeping vanilla behavior") .node("one-seven-visuals", "always-swing").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackDisplay.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackDisplay.java index bdd8d5b2f..f0ad3a863 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackDisplay.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackDisplay.java @@ -42,6 +42,7 @@ public final class ModPackDisplay { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("pack-display", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModPackDisplay { */ public static final NumberOption SCALE = NumberOption.number() .node("pack-display", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModPackDisplay { */ public static final SimpleOption PACK_ICON = SimpleOption.builder() .node("pack-display", "pack-icon").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModPackDisplay { */ public static final SimpleOption PACK_DESCRIPTION = SimpleOption.builder() .node("pack-display", "pack-description").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModPackDisplay { */ public static final SimpleOption PACK_EXTENSION = SimpleOption.builder() .node("pack-display", "pack-extension").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -93,16 +98,19 @@ public final class ModPackDisplay { */ public static final SimpleOption MOVE_TITLE_DOWN = SimpleOption.builder() .node("pack-display", "move-title-down").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("pack-display", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -113,6 +121,7 @@ public final class ModPackDisplay { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("pack-display", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -123,6 +132,7 @@ public final class ModPackDisplay { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("pack-display", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -133,6 +143,7 @@ public final class ModPackDisplay { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("pack-display", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -144,6 +155,7 @@ public final class ModPackDisplay { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("pack-display", "background-height").type(TypeToken.get(Integer.class)) .min(12).max(64) + .defaultValue(24) .notifyClient() .build(); @@ -154,6 +166,7 @@ public final class ModPackDisplay { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("pack-display", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -165,6 +178,7 @@ public final class ModPackDisplay { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("pack-display", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -175,6 +189,7 @@ public final class ModPackDisplay { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("pack-display", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -185,6 +200,7 @@ public final class ModPackDisplay { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("pack-display", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -195,6 +211,7 @@ public final class ModPackDisplay { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("pack-display", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -205,6 +222,7 @@ public final class ModPackDisplay { */ public static final SimpleOption DESCRIPTION_REPLACEMENT_COLOR = SimpleOption.builder() .node("pack-display", "description-replacement-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -215,6 +233,7 @@ public final class ModPackDisplay { */ public static final SimpleOption KEEP_BOLD = SimpleOption.builder() .node("pack-display", "keep-bold").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -225,6 +244,7 @@ public final class ModPackDisplay { */ public static final SimpleOption KEEP_ITALIC = SimpleOption.builder() .node("pack-display", "keep-italic").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -235,6 +255,7 @@ public final class ModPackDisplay { */ public static final SimpleOption KEEP_UNDERLINE = SimpleOption.builder() .node("pack-display", "keep-underline").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -245,6 +266,7 @@ public final class ModPackDisplay { */ public static final SimpleOption KEEP_STRIKETHROUGH = SimpleOption.builder() .node("pack-display", "keep-strikethrough").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -255,6 +277,7 @@ public final class ModPackDisplay { */ public static final SimpleOption KEEP_OBFUSCATED = SimpleOption.builder() .node("pack-display", "keep-obfuscated").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackOrganizer.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackOrganizer.java index 7493610e2..8e6d0d86f 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackOrganizer.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPackOrganizer.java @@ -40,6 +40,7 @@ public final class ModPackOrganizer { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("pack-organizer", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModPackOrganizer { */ public static final SimpleOption SHOW_INCOMPATIBLE = SimpleOption.builder() .node("pack-organizer", "show-incompatible").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModParticleChanger.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModParticleChanger.java index cc114bb74..28832eb9b 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModParticleChanger.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModParticleChanger.java @@ -42,6 +42,7 @@ public final class ModParticleChanger { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("particle-changer", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModParticleChanger { */ public static final SimpleOption ALWAYS_ENCHANT_STRIKES = SimpleOption.builder() .node("particle-changer", "always-enchant-strikes").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModParticleChanger { */ public static final SimpleOption AFFECT_ENCHANTED_WEAPONS = SimpleOption.builder() .node("particle-changer", "affect-enchanted-weapons").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModParticleChanger { public static final SimpleOption HIDE_FIRST_PERSON_PARTICLES = SimpleOption.builder() .comment("Hide your players potion effect particles when you're in first person") .node("particle-changer", "hide-first-person-particles").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModParticleChanger { */ public static final SimpleOption COLOR = SimpleOption.builder() .node("particle-changer", "color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -94,6 +99,7 @@ public final class ModParticleChanger { public static final NumberOption SCALE = NumberOption.number() .node("particle-changer", "scale").type(TypeToken.get(Float.class)) .min(0.5F).max(2.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -105,6 +111,7 @@ public final class ModParticleChanger { public static final NumberOption PARTICLE_MULTIPLIER = NumberOption.number() .node("particle-changer", "particle-multiplier").type(TypeToken.get(Integer.class)) .min(1).max(10) + .defaultValue(1) .notifyClient() .build(); @@ -115,6 +122,7 @@ public final class ModParticleChanger { */ public static final SimpleOption HIDE_PARTICLE = SimpleOption.builder() .node("particle-changer", "hide-particle").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -125,6 +133,7 @@ public final class ModParticleChanger { */ public static final SimpleOption OVERLAY_COLOR = SimpleOption.builder() .node("particle-changer", "overlay-color").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPing.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPing.java index 95a48d12a..21436fd36 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPing.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPing.java @@ -42,6 +42,7 @@ public final class ModPing { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("ping", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -54,6 +55,7 @@ public final class ModPing { .comment("Faster updates may impact performance") .node("ping", "update-interval-sec").type(TypeToken.get(Integer.class)) .min(1).max(120) + .defaultValue(20) .notifyClient() .build(); @@ -66,6 +68,7 @@ public final class ModPing { .comment("How many updates to average together (one update happens per the 'update interval' setting)") .node("ping", "average-samples").type(TypeToken.get(Integer.class)) .min(2).max(20) + .defaultValue(3) .notifyClient() .build(); @@ -76,6 +79,7 @@ public final class ModPing { */ public static final SimpleOption PING_SPIKE_DETECTION = SimpleOption.builder() .node("ping", "ping-spike-detection").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -87,6 +91,7 @@ public final class ModPing { public static final NumberOption MEDIUM_SPIKE_THRESHOLD = NumberOption.number() .node("ping", "medium-spike-threshold").type(TypeToken.get(Integer.class)) .min(1).max(200) + .defaultValue(20) .notifyClient() .build(); @@ -97,6 +102,7 @@ public final class ModPing { */ public static final SimpleOption MEDIUM_SPIKE_COLOR = SimpleOption.builder() .node("ping", "medium-spike-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 145, 0)) .notifyClient() .build(); @@ -108,6 +114,7 @@ public final class ModPing { public static final NumberOption LARGE_SPIKE_THRESHOLD = NumberOption.number() .node("ping", "large-spike-threshold").type(TypeToken.get(Integer.class)) .min(1).max(200) + .defaultValue(50) .notifyClient() .build(); @@ -118,6 +125,7 @@ public final class ModPing { */ public static final SimpleOption LARGE_SPIKE_COLOR = SimpleOption.builder() .node("ping", "large-spike-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 0, 0)) .notifyClient() .build(); @@ -128,6 +136,7 @@ public final class ModPing { */ public static final SimpleOption PING_SHOW_MS = SimpleOption.builder() .node("ping", "ping-show-ms").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -138,6 +147,7 @@ public final class ModPing { */ public static final SimpleOption SHOW_PING_PREFIX = SimpleOption.builder() .node("ping", "show-ping-prefix").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -148,6 +158,7 @@ public final class ModPing { */ public static final SimpleOption PING_PREFIX_COLOR = SimpleOption.builder() .node("ping", "ping-prefix-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -158,6 +169,7 @@ public final class ModPing { */ public static final SimpleOption DYNAMIC_PING_COLOR = SimpleOption.builder() .node("ping", "dynamic-ping-color").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -168,6 +180,7 @@ public final class ModPing { */ public static final SimpleOption PING_NUMBER_COLOR = SimpleOption.builder() .node("ping", "ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); @@ -178,6 +191,7 @@ public final class ModPing { */ public static final SimpleOption LOW_PING_NUMBER_COLOR = SimpleOption.builder() .node("ping", "low-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(85, 255, 85)) .notifyClient() .build(); @@ -188,6 +202,7 @@ public final class ModPing { */ public static final SimpleOption MEDIUM_PING_NUMBER_COLOR = SimpleOption.builder() .node("ping", "medium-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); @@ -198,6 +213,7 @@ public final class ModPing { */ public static final SimpleOption HIGH_PING_NUMBER_COLOR = SimpleOption.builder() .node("ping", "high-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 85, 85)) .notifyClient() .build(); @@ -208,6 +224,7 @@ public final class ModPing { */ public static final SimpleOption EXTREME_PING_NUMBER_COLOR = SimpleOption.builder() .node("ping", "extreme-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(170, 0, 0)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPlaytime.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPlaytime.java index 57a67f40c..2484208a2 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPlaytime.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPlaytime.java @@ -42,6 +42,7 @@ public final class ModPlaytime { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("playtime", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,20 @@ public final class ModPlaytime { */ public static final NumberOption SCALE = NumberOption.number() .node("playtime", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("playtime", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +77,7 @@ public final class ModPlaytime { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("playtime", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +88,7 @@ public final class ModPlaytime { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("playtime", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +99,7 @@ public final class ModPlaytime { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("playtime", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +111,7 @@ public final class ModPlaytime { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("playtime", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +123,7 @@ public final class ModPlaytime { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("playtime", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +135,7 @@ public final class ModPlaytime { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("playtime", "background-width").type(TypeToken.get(Integer.class)) .min(60).max(120) + .defaultValue(80) .notifyClient() .build(); @@ -137,6 +147,7 @@ public final class ModPlaytime { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("playtime", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +158,7 @@ public final class ModPlaytime { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("playtime", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +170,7 @@ public final class ModPlaytime { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("playtime", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +181,7 @@ public final class ModPlaytime { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("playtime", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +192,7 @@ public final class ModPlaytime { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("playtime", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,6 +203,7 @@ public final class ModPlaytime { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("playtime", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPotionEffects.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPotionEffects.java index 302c43d73..f00354aac 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPotionEffects.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPotionEffects.java @@ -42,6 +42,7 @@ public final class ModPotionEffects { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("potion-effects", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModPotionEffects { */ public static final NumberOption SCALE = NumberOption.number() .node("potion-effects", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModPotionEffects { */ public static final SimpleOption SHOW_IN_INVENTORY = SimpleOption.builder() .node("potion-effects", "show-in-inventory").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModPotionEffects { */ public static final SimpleOption SHOW_WHILE_TYPING = SimpleOption.builder() .node("potion-effects", "show-while-typing").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,16 +87,19 @@ public final class ModPotionEffects { */ public static final SimpleOption EFFECT_NAME = SimpleOption.builder() .node("potion-effects", "effect-name").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("potion-effects", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -103,6 +110,7 @@ public final class ModPotionEffects { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("potion-effects", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -113,6 +121,7 @@ public final class ModPotionEffects { */ public static final SimpleOption MINIMAL_MODE = SimpleOption.builder() .node("potion-effects", "minimal-mode").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -123,6 +132,7 @@ public final class ModPotionEffects { */ public static final SimpleOption MINIMAL_MODE_HORIZONTAL = SimpleOption.builder() .node("potion-effects", "minimal-mode-horizontal").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -133,6 +143,7 @@ public final class ModPotionEffects { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("potion-effects", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -144,6 +155,7 @@ public final class ModPotionEffects { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("potion-effects", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -154,6 +166,7 @@ public final class ModPotionEffects { */ public static final SimpleOption FORMATTED_DURATIONS = SimpleOption.builder() .node("potion-effects", "formatted-durations").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -164,6 +177,7 @@ public final class ModPotionEffects { */ public static final SimpleOption UPPERCASE_POTION_NAMES = SimpleOption.builder() .node("potion-effects", "uppercase-potion-names").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -174,6 +188,7 @@ public final class ModPotionEffects { */ public static final SimpleOption REVERSED_TEXT = SimpleOption.builder() .node("potion-effects", "reversed-text").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -184,6 +199,7 @@ public final class ModPotionEffects { */ public static final SimpleOption HIDE_MODERN_ICONS = SimpleOption.builder() .node("potion-effects", "hide-modern-icons").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -194,6 +210,7 @@ public final class ModPotionEffects { */ public static final SimpleOption POTION_BLINK = SimpleOption.builder() .node("potion-effects", "potion-blink").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -205,6 +222,7 @@ public final class ModPotionEffects { public static final NumberOption BLINK_DURATION = NumberOption.number() .node("potion-effects", "blink-duration").type(TypeToken.get(Integer.class)) .min(2).max(20) + .defaultValue(10) .notifyClient() .build(); @@ -215,6 +233,7 @@ public final class ModPotionEffects { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("potion-effects", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -225,6 +244,7 @@ public final class ModPotionEffects { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("potion-effects", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -235,6 +255,7 @@ public final class ModPotionEffects { */ public static final SimpleOption COLOR_NAME_BASED_ON_EFFECT = SimpleOption.builder() .node("potion-effects", "color-name-based-on-effect").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -245,6 +266,7 @@ public final class ModPotionEffects { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("potion-effects", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -255,6 +277,7 @@ public final class ModPotionEffects { */ public static final SimpleOption DURATION_COLOR = SimpleOption.builder() .node("potion-effects", "duration-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -265,6 +288,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_PERM = SimpleOption.builder() .node("potion-effects", "exclude-perm").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -275,6 +299,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_ABSORPTION = SimpleOption.builder() .node("potion-effects", "exclude-absorption").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -285,6 +310,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_BLINDNESS = SimpleOption.builder() .node("potion-effects", "exclude-blindness").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -295,6 +321,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_FIRE_RES = SimpleOption.builder() .node("potion-effects", "exclude-fire-res").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -305,6 +332,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_HASTE = SimpleOption.builder() .node("potion-effects", "exclude-haste").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -315,6 +343,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_HEALTH_BOOST = SimpleOption.builder() .node("potion-effects", "exclude-health-boost").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -325,6 +354,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_HUNGER = SimpleOption.builder() .node("potion-effects", "exclude-hunger").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -335,6 +365,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_INSTANT_DAMAGE = SimpleOption.builder() .node("potion-effects", "exclude-instant-damage").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -345,6 +376,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_INSTANT_HEALTH = SimpleOption.builder() .node("potion-effects", "exclude-instant-health").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -355,6 +387,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_INVIS = SimpleOption.builder() .node("potion-effects", "exclude-invis").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -365,6 +398,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_JUMP_BOOST = SimpleOption.builder() .node("potion-effects", "exclude-jump-boost").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -375,6 +409,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_MINING_FATIGUE = SimpleOption.builder() .node("potion-effects", "exclude-mining-fatigue").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -385,6 +420,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_NAUSEA = SimpleOption.builder() .node("potion-effects", "exclude-nausea").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -395,6 +431,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_NIGHT_VISION = SimpleOption.builder() .node("potion-effects", "exclude-night-vision").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -405,6 +442,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_POISON = SimpleOption.builder() .node("potion-effects", "exclude-poison").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -415,6 +453,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_REGEN = SimpleOption.builder() .node("potion-effects", "exclude-regen").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -425,6 +464,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_RESISTANCE = SimpleOption.builder() .node("potion-effects", "exclude-resistance").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -435,6 +475,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_SATURATION = SimpleOption.builder() .node("potion-effects", "exclude-saturation").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -445,6 +486,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_SLOWNESS = SimpleOption.builder() .node("potion-effects", "exclude-slowness").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -455,6 +497,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_SPEED = SimpleOption.builder() .node("potion-effects", "exclude-speed").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -465,6 +508,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_STRENGTH = SimpleOption.builder() .node("potion-effects", "exclude-strength").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -475,6 +519,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_WATER_BREATHING = SimpleOption.builder() .node("potion-effects", "exclude-water-breathing").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -485,6 +530,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_WEAKNESS = SimpleOption.builder() .node("potion-effects", "exclude-weakness").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -495,6 +541,7 @@ public final class ModPotionEffects { */ public static final SimpleOption EXCLUDE_WITHER = SimpleOption.builder() .node("potion-effects", "exclude-wither").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPvpInfo.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPvpInfo.java index ecd2d2abe..e9106493f 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPvpInfo.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModPvpInfo.java @@ -40,6 +40,7 @@ public final class ModPvpInfo { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("pvp-info", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModPvpInfo { */ public static final SimpleOption RESET_ON_WORLD_CHANGE = SimpleOption.builder() .node("pvp-info", "reset-on-world-change").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModQuickplay.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModQuickplay.java index 6a028c1d3..f65e63e65 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModQuickplay.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModQuickplay.java @@ -40,6 +40,7 @@ public final class ModQuickplay { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("quickplay", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRadio.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRadio.java index 666a2632a..0b7b891af 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRadio.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRadio.java @@ -42,6 +42,7 @@ public final class ModRadio { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("radio", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -50,9 +51,10 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final NumberOption VOLUME = NumberOption.number() - .node("radio", "volume").type(TypeToken.get(Integer.class)) - .min(0).max(100) + public static final NumberOption SCALE = NumberOption.number() + .node("radio", "scale").type(TypeToken.get(Float.class)) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -61,8 +63,10 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption MUTE_RADIO = SimpleOption.builder() - .node("radio", "mute-radio").type(TypeToken.get(Boolean.class)) + public static final NumberOption VOLUME = NumberOption.number() + .node("radio", "volume").type(TypeToken.get(Integer.class)) + .min(0).max(100) + .defaultValue(50) .notifyClient() .build(); @@ -71,9 +75,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final NumberOption SCALE = NumberOption.number() - .node("radio", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + public static final SimpleOption MUTE_RADIO = SimpleOption.builder() + .node("radio", "mute-radio").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -82,30 +86,31 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption BACKGROUND = SimpleOption.builder() - .node("radio", "background").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SHOW_COVER_ART = SimpleOption.builder() + .node("radio", "show-cover-art").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * If this is disabled the background will change size with the text. + * No documentation available. * * @since 1.1.7 */ - public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() - .comment("If this is disabled the background will change size with the text.") - .node("radio", "static-background-width").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SHOW_PROGRESS = SimpleOption.builder() + .node("radio", "show-progress").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * If this is disabled the background will change size with the text. + * No documentation available. * * @since 1.1.7 */ - public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() - .comment("If this is disabled the background will change size with the text.") - .node("radio", "static-background-height").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SONG_SCROLL_ANIMATION = SimpleOption.builder() + .node("radio", "song-scroll-animation").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -114,9 +119,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() - .node("radio", "background-width").type(TypeToken.get(Integer.class)) - .min(60).max(300) + public static final SimpleOption SHOW_WHEN_NOTHING_PLAYING = SimpleOption.builder() + .node("radio", "show-when-nothing-playing").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -125,9 +130,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() - .node("radio", "background-height").type(TypeToken.get(Integer.class)) - .min(22).max(64) + public static final SimpleOption BOLD_ARIST_NAME = SimpleOption.builder() + .node("radio", "bold-arist-name").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -136,8 +141,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption BORDER = SimpleOption.builder() - .node("radio", "border").type(TypeToken.get(Boolean.class)) + public static final SimpleOption BOLD_SONG_NAME = SimpleOption.builder() + .node("radio", "bold-song-name").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -146,9 +152,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final NumberOption BORDER_THICKNESS = NumberOption.number() - .node("radio", "border-thickness").type(TypeToken.get(Float.class)) - .min(0.5F).max(3.0F) + public static final SimpleOption SHOW_DURATION = SimpleOption.builder() + .node("radio", "show-duration").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -157,8 +163,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption BORDER_COLOR = SimpleOption.builder() - .node("radio", "border-color").type(TypeToken.get(Color.class)) + public static final SimpleOption SHOW_PLAY_BUTTON = SimpleOption.builder() + .node("radio", "show-play-button").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -167,28 +174,33 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() - .node("radio", "background-color").type(TypeToken.get(Color.class)) + public static final SimpleOption BACKGROUND = SimpleOption.builder() + .node("radio", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * If this is disabled the background will change size with the text. * * @since 1.1.7 */ - public static final SimpleOption SHOW_COVER_ART = SimpleOption.builder() - .node("radio", "show-cover-art").type(TypeToken.get(Boolean.class)) + public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() + .comment("If this is disabled the background will change size with the text.") + .node("radio", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * If this is disabled the background will change size with the text. * * @since 1.1.7 */ - public static final SimpleOption SHOW_PROGRESS = SimpleOption.builder() - .node("radio", "show-progress").type(TypeToken.get(Boolean.class)) + public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() + .comment("If this is disabled the background will change size with the text.") + .node("radio", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -197,8 +209,10 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption SONG_SCROLL_ANIMATION = SimpleOption.builder() - .node("radio", "song-scroll-animation").type(TypeToken.get(Boolean.class)) + public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() + .node("radio", "background-width").type(TypeToken.get(Integer.class)) + .min(60).max(300) + .defaultValue(140) .notifyClient() .build(); @@ -207,8 +221,10 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption SHOW_WHEN_NOTHING_PLAYING = SimpleOption.builder() - .node("radio", "show-when-nothing-playing").type(TypeToken.get(Boolean.class)) + public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() + .node("radio", "background-height").type(TypeToken.get(Integer.class)) + .min(22).max(64) + .defaultValue(24) .notifyClient() .build(); @@ -217,8 +233,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption BOLD_ARIST_NAME = SimpleOption.builder() - .node("radio", "bold-arist-name").type(TypeToken.get(Boolean.class)) + public static final SimpleOption BORDER = SimpleOption.builder() + .node("radio", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -227,8 +244,10 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption BOLD_SONG_NAME = SimpleOption.builder() - .node("radio", "bold-song-name").type(TypeToken.get(Boolean.class)) + public static final NumberOption BORDER_THICKNESS = NumberOption.number() + .node("radio", "border-thickness").type(TypeToken.get(Float.class)) + .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -237,8 +256,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption SHOW_DURATION = SimpleOption.builder() - .node("radio", "show-duration").type(TypeToken.get(Boolean.class)) + public static final SimpleOption BORDER_COLOR = SimpleOption.builder() + .node("radio", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -247,8 +267,9 @@ public final class ModRadio { * * @since 1.1.7 */ - public static final SimpleOption SHOW_PLAY_BUTTON = SimpleOption.builder() - .node("radio", "show-play-button").type(TypeToken.get(Boolean.class)) + public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() + .node("radio", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -259,6 +280,7 @@ public final class ModRadio { */ public static final SimpleOption SONG_NAME_TEXT_COLOR = SimpleOption.builder() .node("radio", "song-name-text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -269,6 +291,7 @@ public final class ModRadio { */ public static final SimpleOption ARTIST_NAME_TEXT_COLOR = SimpleOption.builder() .node("radio", "artist-name-text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -279,6 +302,7 @@ public final class ModRadio { */ public static final SimpleOption RADIO_PROGRESS_BAR_COLOR = SimpleOption.builder() .node("radio", "radio-progress-bar-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(79, 148, 252)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReachDisplay.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReachDisplay.java index 63f6a9b08..bb96f6c1a 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReachDisplay.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReachDisplay.java @@ -42,6 +42,7 @@ public final class ModReachDisplay { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("reach-display", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,17 +53,20 @@ public final class ModReachDisplay { */ public static final NumberOption SCALE = NumberOption.number() .node("reach-display", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("reach-display", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +77,7 @@ public final class ModReachDisplay { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("reach-display", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +88,7 @@ public final class ModReachDisplay { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("reach-display", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +99,7 @@ public final class ModReachDisplay { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("reach-display", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +111,7 @@ public final class ModReachDisplay { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("reach-display", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +123,7 @@ public final class ModReachDisplay { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("reach-display", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +135,7 @@ public final class ModReachDisplay { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("reach-display", "background-width").type(TypeToken.get(Integer.class)) .min(40).max(72) + .defaultValue(65) .notifyClient() .build(); @@ -137,6 +147,7 @@ public final class ModReachDisplay { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("reach-display", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +158,7 @@ public final class ModReachDisplay { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("reach-display", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +170,7 @@ public final class ModReachDisplay { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("reach-display", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +181,7 @@ public final class ModReachDisplay { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("reach-display", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +192,7 @@ public final class ModReachDisplay { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("reach-display", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,6 +203,7 @@ public final class ModReachDisplay { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("reach-display", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReplaymod.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReplaymod.java index 7adc8fc4f..c59e5d557 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReplaymod.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModReplaymod.java @@ -41,6 +41,7 @@ public final class ModReplaymod { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("replaymod", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModReplaymod { */ public static final SimpleOption INDICATOR = SimpleOption.builder() .node("replaymod", "indicator").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModReplaymod { */ public static final SimpleOption AUTO_POST_PROCESS = SimpleOption.builder() .node("replaymod", "auto-post-process").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModReplaymod { */ public static final SimpleOption SHOW_SERVER_IP = SimpleOption.builder() .node("replaymod", "show-server-ip").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -81,6 +85,7 @@ public final class ModReplaymod { */ public static final SimpleOption AUTO_SYNC = SimpleOption.builder() .node("replaymod", "auto-sync").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -92,6 +97,7 @@ public final class ModReplaymod { public static final NumberOption TIMELINE_LENGTH = NumberOption.number() .node("replaymod", "timeline-length").type(TypeToken.get(Integer.class)) .min(1500).max(2100) + .defaultValue(1800) .notifyClient() .build(); @@ -102,6 +108,7 @@ public final class ModReplaymod { */ public static final SimpleOption ASK_FOR_OPEN_EYE = SimpleOption.builder() .node("replaymod", "ask-for-open-eye").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -112,6 +119,7 @@ public final class ModReplaymod { */ public static final SimpleOption SKIP_POST_RENDER_GUI = SimpleOption.builder() .node("replaymod", "skip-post-render-gui").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -122,6 +130,7 @@ public final class ModReplaymod { */ public static final SimpleOption SKIP_POST_SCREENSHOT_GUI = SimpleOption.builder() .node("replaymod", "skip-post-screenshot-gui").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -132,6 +141,7 @@ public final class ModReplaymod { */ public static final SimpleOption PATH_PREVIEW = SimpleOption.builder() .node("replaymod", "path-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -142,6 +152,7 @@ public final class ModReplaymod { */ public static final SimpleOption LUNAR_UI = SimpleOption.builder() .node("replaymod", "lunar-u-i").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -152,6 +163,7 @@ public final class ModReplaymod { */ public static final SimpleOption NOTIFICATIONS = SimpleOption.builder() .node("replaymod", "notifications").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -162,6 +174,7 @@ public final class ModReplaymod { */ public static final SimpleOption RECORD_SINGLEPLAYER = SimpleOption.builder() .node("replaymod", "record-singleplayer").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -172,6 +185,7 @@ public final class ModReplaymod { */ public static final SimpleOption RECORD_SERVER = SimpleOption.builder() .node("replaymod", "record-server").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -182,6 +196,7 @@ public final class ModReplaymod { */ public static final SimpleOption AUTO_START_RECORDING = SimpleOption.builder() .node("replaymod", "auto-start-recording").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -192,6 +207,7 @@ public final class ModReplaymod { */ public static final SimpleOption RENAME_DIALOG = SimpleOption.builder() .node("replaymod", "rename-dialog").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -202,6 +218,7 @@ public final class ModReplaymod { */ public static final SimpleOption SHOW_CHAT = SimpleOption.builder() .node("replaymod", "show-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRewind.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRewind.java new file mode 100644 index 000000000..e2a8c7c52 --- /dev/null +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModRewind.java @@ -0,0 +1,50 @@ +/* + * 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.mods.impl; + +import com.lunarclient.apollo.option.SimpleOption; +import io.leangen.geantyref.TypeToken; + +/** + * Record your game sessions and rewind them from any perspective. + * + * @since 1.2.1 + */ +public final class ModRewind { + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption ENABLED = SimpleOption.builder() + .node("rewind", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + private ModRewind() { + } + +} diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSaturation.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSaturation.java index a7d3c5fa1..e35e81b38 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSaturation.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSaturation.java @@ -40,6 +40,7 @@ public final class ModSaturation { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("saturation", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModSaturation { */ public static final SimpleOption SHOW_SATURATION_OVERLAY = SimpleOption.builder() .node("saturation", "show-saturation-overlay").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -60,6 +62,7 @@ public final class ModSaturation { */ public static final SimpleOption SHOW_APPLESKIN_TOOLTIP = SimpleOption.builder() .node("saturation", "show-appleskin-tooltip").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -70,6 +73,7 @@ public final class ModSaturation { */ public static final SimpleOption SHOW_HELD_ITEM_HUNGER = SimpleOption.builder() .node("saturation", "show-held-item-hunger").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -80,6 +84,7 @@ public final class ModSaturation { */ public static final SimpleOption SHOW_HELD_ITEM_SATURATION = SimpleOption.builder() .node("saturation", "show-held-item-saturation").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSba.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSba.java index d7f98674a..ba6b5687c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSba.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSba.java @@ -42,6 +42,7 @@ public final class ModSba { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("sba", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_HEALTH_BAR = SimpleOption.builder() .node("sba", "hide-health-bar").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_FOOD_BAR = SimpleOption.builder() .node("sba", "hide-food-bar").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -72,6 +75,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_PET_HEALTH_BAR = SimpleOption.builder() .node("sba", "hide-pet-health-bar").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -82,6 +86,7 @@ public final class ModSba { */ public static final SimpleOption SKELETON_HELMET_BARS = SimpleOption.builder() .node("sba", "skeleton-helmet-bars").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -92,6 +97,7 @@ public final class ModSba { */ public static final SimpleOption COOLDOWN_PREDICTION = SimpleOption.builder() .node("sba", "cooldown-prediction").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -102,6 +108,7 @@ public final class ModSba { */ public static final SimpleOption LEG_MONKEY_LVL_100 = SimpleOption.builder() .node("sba", "leg-monkey-lvl100").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -112,6 +119,7 @@ public final class ModSba { */ public static final SimpleOption COMPACT_TAB_LIST = SimpleOption.builder() .node("sba", "compact-tab-list").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -122,6 +130,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_ITEM_COOLDOWNS = SimpleOption.builder() .node("sba", "show-item-cooldowns").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -132,6 +141,7 @@ public final class ModSba { */ public static final SimpleOption USE_LUNAR_COOLDOWNS = SimpleOption.builder() .node("sba", "use-lunar-cooldowns").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -142,6 +152,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_TRUE_DEFENSE = SimpleOption.builder() .node("sba", "hide-true-defense").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -152,6 +163,7 @@ public final class ModSba { */ public static final SimpleOption SPECIAL_ZEALOT_ALERT = SimpleOption.builder() .node("sba", "special-zealot-alert").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -162,6 +174,7 @@ public final class ModSba { */ public static final SimpleOption ZEALOT_COUNTER_EXPLOSIVE_BOW_SUPPORT = SimpleOption.builder() .node("sba", "zealot-counter-explosive-bow-support").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -172,6 +185,7 @@ public final class ModSba { */ public static final SimpleOption ZEALOT_COLOR_BOOLEAN = SimpleOption.builder() .node("sba", "zealot-color-boolean").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -182,6 +196,7 @@ public final class ModSba { */ public static final SimpleOption ZEALOT_COLOR = SimpleOption.builder() .node("sba", "zealot-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(32, 32, 32)) .notifyClient() .build(); @@ -192,6 +207,7 @@ public final class ModSba { */ public static final SimpleOption LOCK_SLOTS = SimpleOption.builder() .node("sba", "lock-slots").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -202,6 +218,7 @@ public final class ModSba { */ public static final SimpleOption STOP_DROPPING_SELLING_RARE_ITEMS = SimpleOption.builder() .node("sba", "stop-dropping-selling-rare-items").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -212,6 +229,7 @@ public final class ModSba { */ public static final SimpleOption AVOID_BLINKING_NIGHT_VISION = SimpleOption.builder() .node("sba", "avoid-blinking-night-vision").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -222,6 +240,7 @@ public final class ModSba { */ public static final SimpleOption MAKE_BACKPACK_INVENTORIES_COLORED = SimpleOption.builder() .node("sba", "make-backpack-inventories-colored").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -232,6 +251,7 @@ public final class ModSba { */ public static final SimpleOption FISHING_SOUND_INDICATOR = SimpleOption.builder() .node("sba", "fishing-sound-indicator").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -242,6 +262,7 @@ public final class ModSba { */ public static final SimpleOption CHANGE_BAR_COLOR_FOR_POTIONS = SimpleOption.builder() .node("sba", "change-bar-color-for-potions").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -252,6 +273,7 @@ public final class ModSba { */ public static final SimpleOption COLOR_ENDER_CHEST_IN_END = SimpleOption.builder() .node("sba", "color-ender-chest-in-end").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -262,6 +284,7 @@ public final class ModSba { */ public static final SimpleOption END_ENDER_CHEST_COLOR = SimpleOption.builder() .node("sba", "end-ender-chest-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(32, 32, 32)) .notifyClient() .build(); @@ -272,6 +295,7 @@ public final class ModSba { */ public static final SimpleOption OUTBID_ALERT_SOUND = SimpleOption.builder() .node("sba", "outbid-alert-sound").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -282,6 +306,7 @@ public final class ModSba { */ public static final SimpleOption OUTBID_ALERT_SOUND_IN_OTHER_GAMES = SimpleOption.builder() .node("sba", "outbid-alert-sound-in-other-games").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -292,6 +317,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_OTHER_PLAYER_PRESENTS = SimpleOption.builder() .node("sba", "hide-other-player-presents").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -303,6 +329,7 @@ public final class ModSba { public static final SimpleOption ENTITY_GLOW = SimpleOption.builder() .comment("Requires Fast Render to be OFF.") .node("sba", "entity-glow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -313,6 +340,7 @@ public final class ModSba { */ public static final SimpleOption DROPPED_ITEMS_GLOW = SimpleOption.builder() .node("sba", "dropped-items-glow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -323,6 +351,7 @@ public final class ModSba { */ public static final SimpleOption DROPPED_ITEMS_GLOW_ON_ISLAND = SimpleOption.builder() .node("sba", "dropped-items-glow-on-island").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -333,6 +362,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_SVEN_PUP_NAMETAGS = SimpleOption.builder() .node("sba", "hide-sven-pup-nametags").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -343,6 +373,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_PLAYERS_IN_LOBBY = SimpleOption.builder() .node("sba", "hide-players-in-lobby").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -353,6 +384,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_SPAWN_POINT_PLAYERS = SimpleOption.builder() .node("sba", "hide-spawn-point-players").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -363,6 +395,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_BONES = SimpleOption.builder() .node("sba", "hide-bones").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -373,6 +406,7 @@ public final class ModSba { */ public static final SimpleOption BIGGER_FISHING_WAKE = SimpleOption.builder() .node("sba", "bigger-fishing-wake").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -383,6 +417,7 @@ public final class ModSba { */ public static final SimpleOption STOP_RAT_SOUNDS = SimpleOption.builder() .node("sba", "stop-rat-sounds").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -393,6 +428,7 @@ public final class ModSba { */ public static final SimpleOption STOP_ONLY_RAT_SQUEAK = SimpleOption.builder() .node("sba", "stop-only-rat-squeak").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -403,6 +439,7 @@ public final class ModSba { */ public static final SimpleOption FISHING_PARTICLE_OVERLAY = SimpleOption.builder() .node("sba", "fishing-particle-overlay").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -413,6 +450,7 @@ public final class ModSba { */ public static final SimpleOption FISHING_PARTICLE_OVERLAY_COLOR = SimpleOption.builder() .node("sba", "fishing-particle-overlay-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -423,6 +461,7 @@ public final class ModSba { */ public static final SimpleOption DUNGEON_TEAMMATES_GLOW = SimpleOption.builder() .node("sba", "dungeon-teammates-glow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -433,6 +472,7 @@ public final class ModSba { */ public static final SimpleOption CRITICAL_HEALTH_DUNGEON_TEAMMATE_WARNING = SimpleOption.builder() .node("sba", "critical-health-dungeon-teammate-warning").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -443,6 +483,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_DUNGEON_TEAMMATE_NAME_OVERLAY = SimpleOption.builder() .node("sba", "show-dungeon-teammate-name-overlay").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -453,6 +494,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_HEALING_CIRCLE_WALL = SimpleOption.builder() .node("sba", "show-healing-circle-wall").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -464,6 +506,7 @@ public final class ModSba { public static final NumberOption HEALING_CIRCLE_OPACITY = NumberOption.number() .node("sba", "healing-circle-opacity").type(TypeToken.get(Float.class)) .min(0.1F).max(1.0F) + .defaultValue(0.4F) .notifyClient() .build(); @@ -474,6 +517,7 @@ public final class ModSba { */ public static final SimpleOption STOP_BONZO_STAFF_SOUNDS = SimpleOption.builder() .node("sba", "stop-bonzo-staff-sounds").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -484,6 +528,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_SALVAGE_ESSENCES_COUNTER = SimpleOption.builder() .node("sba", "show-salvage-essences-counter").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -494,6 +539,7 @@ public final class ModSba { */ public static final SimpleOption RESET_SALVAGED_ESSENCES_AFTER_LEAVING_MENU = SimpleOption.builder() .node("sba", "reset-salvaged-essences-after-leaving-menu").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -504,6 +550,7 @@ public final class ModSba { */ public static final SimpleOption CHANGE_DUNGEON_MAP_ZOOM_WITH_KEYBOARD = SimpleOption.builder() .node("sba", "change-dungeon-map-zoom-with-keyboard").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -514,6 +561,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_ENCHANT_DESCRIPTION = SimpleOption.builder() .node("sba", "hide-enchant-description").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -524,6 +572,7 @@ public final class ModSba { */ public static final SimpleOption ENABLE_MESSAGE_WHEN_BREAKING_PARK = SimpleOption.builder() .node("sba", "enable-message-when-breaking-park").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -534,6 +583,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_BACKPACK_PREVIEW = SimpleOption.builder() .node("sba", "show-backpack-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -544,6 +594,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_BACKPACK_HOLDING_SHIFT = SimpleOption.builder() .node("sba", "show-backpack-holding-shift").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -554,6 +605,7 @@ public final class ModSba { */ public static final SimpleOption BACKPACK_PREVIEW_AH = SimpleOption.builder() .node("sba", "backpack-preview-ah").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -564,6 +616,7 @@ public final class ModSba { */ public static final SimpleOption CAKE_BAG_PREVIEW = SimpleOption.builder() .node("sba", "cake-bag-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -574,6 +627,7 @@ public final class ModSba { */ public static final SimpleOption BACKPACK_OPENING_SOUND = SimpleOption.builder() .node("sba", "backpack-opening-sound").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -584,6 +638,7 @@ public final class ModSba { */ public static final SimpleOption FANCY_WARP_MENU = SimpleOption.builder() .node("sba", "fancy-warp-menu").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -594,6 +649,7 @@ public final class ModSba { */ public static final SimpleOption WARP_ADVANCED_MODE = SimpleOption.builder() .node("sba", "warp-advanced-mode").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -604,6 +660,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_ENDERMAN_TELEPORTION_EFFECT = SimpleOption.builder() .node("sba", "disable-enderman-teleportion-effect").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -614,6 +671,7 @@ public final class ModSba { */ public static final SimpleOption HIDE_GREY_ENCHANTS = SimpleOption.builder() .node("sba", "hide-grey-enchants").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -624,6 +682,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_ITEM_ANVIL_USES = SimpleOption.builder() .node("sba", "show-item-anvil-uses").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -634,6 +693,7 @@ public final class ModSba { */ public static final SimpleOption REPLACE_ROMAN_NUMERALS_WITH_NUMBERS = SimpleOption.builder() .node("sba", "replace-roman-numerals-with-numbers").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -644,6 +704,7 @@ public final class ModSba { */ public static final SimpleOption DONT_REPLACE_ROMAN_NUMERALS_IN_ITEM_NAME = SimpleOption.builder() .node("sba", "dont-replace-roman-numerals-in-item-name").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -654,6 +715,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_ENCHANTMENTS_REFORGES = SimpleOption.builder() .node("sba", "show-enchantments-reforges").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -664,6 +726,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_BROKEN_FRAGMENTS = SimpleOption.builder() .node("sba", "show-broken-fragments").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -674,6 +737,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_BASE_STAT_BOOST_PERCENTAGE = SimpleOption.builder() .node("sba", "show-base-stat-boost-percentage").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -684,6 +748,7 @@ public final class ModSba { */ public static final SimpleOption BASE_STAT_BOOST_COLOR_BY_RARITY = SimpleOption.builder() .node("sba", "base-stat-boost-color-by-rarity").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -694,6 +759,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_ITEM_DUNGEON_FLOOR = SimpleOption.builder() .node("sba", "show-item-dungeon-floor").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -704,6 +770,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_RARITY_UPGRADED = SimpleOption.builder() .node("sba", "show-rarity-upgraded").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -714,6 +781,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_STACKING_ENCHANT_PROGRESS = SimpleOption.builder() .node("sba", "show-stacking-enchant-progress").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -725,6 +793,7 @@ public final class ModSba { public static final SimpleOption SHOW_SWORD_KILLS = SimpleOption.builder() .comment("Shows the kills for swords that give stats reflecting the enemies killed with said sword (ex. Fels Sword)") .node("sba", "show-sword-kills").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -735,6 +804,7 @@ public final class ModSba { */ public static final SimpleOption ENCHANTMENT_LORE_PARSING = SimpleOption.builder() .node("sba", "enchantment-lore-parsing").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -745,6 +815,7 @@ public final class ModSba { */ public static final SimpleOption HIGHLIGHT_SPECIAL_ENCHANTMENTS = SimpleOption.builder() .node("sba", "highlight-special-enchantments").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -755,6 +826,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_EXPERIMENTATION_TABLE_TOOLTIPS = SimpleOption.builder() .node("sba", "show-experimentation-table-tooltips").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -765,6 +837,7 @@ public final class ModSba { */ public static final SimpleOption DEVELOPER_MODE = SimpleOption.builder() .node("sba", "developer-mode").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -775,6 +848,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_SKY_BLOCK_ITEM_ID = SimpleOption.builder() .node("sba", "show-sky-block-item-i-d").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -785,6 +859,7 @@ public final class ModSba { */ public static final SimpleOption DONT_RESET_CURSOR_INVENTORY = SimpleOption.builder() .node("sba", "dont-reset-cursor-inventory").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -795,6 +870,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_PERSONAL_COMPACTOR_PREVIEW = SimpleOption.builder() .node("sba", "show-personal-compactor-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -805,6 +881,7 @@ public final class ModSba { */ public static final SimpleOption REFORGE_FILTER = SimpleOption.builder() .node("sba", "reforge-filter").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -815,6 +892,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_ENDER_CHEST_PREVIEW = SimpleOption.builder() .node("sba", "show-ender-chest-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -825,6 +903,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_EMPTY_GLASS_PANES = SimpleOption.builder() .node("sba", "disable-empty-glass-panes").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -835,6 +914,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_TELEPORT_PAD_MESSAGES = SimpleOption.builder() .node("sba", "disable-teleport-pad-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -845,6 +925,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_MAGICAL_SOUP_MESSAGES = SimpleOption.builder() .node("sba", "disable-magical-soup-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -855,6 +936,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_MORT_MESSAGES = SimpleOption.builder() .node("sba", "disable-mort-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -865,6 +947,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_BOSS_MESSAGES = SimpleOption.builder() .node("sba", "disable-boss-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -875,6 +958,7 @@ public final class ModSba { */ public static final SimpleOption DISABLE_SPIRIT_SCEPTRE_MESSAGES = SimpleOption.builder() .node("sba", "disable-spirit-sceptre-messages").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -885,6 +969,7 @@ public final class ModSba { */ public static final SimpleOption PLAYER_SYMBOLS_IN_CHAT = SimpleOption.builder() .node("sba", "player-symbols-in-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -895,6 +980,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_PROFILE_TYPE = SimpleOption.builder() .node("sba", "show-profile-type").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -905,6 +991,7 @@ public final class ModSba { */ public static final SimpleOption SHOW_NETHER_FACTION = SimpleOption.builder() .node("sba", "show-nether-faction").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -915,6 +1002,7 @@ public final class ModSba { */ public static final SimpleOption TREVOR_THE_TRAPPER_FEATURES = SimpleOption.builder() .node("sba", "trevor-the-trapper-features").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -925,6 +1013,7 @@ public final class ModSba { */ public static final SimpleOption TREVOR_HIGHLIGHT_TRACKED_ENTITY = SimpleOption.builder() .node("sba", "trevor-highlight-tracked-entity").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -935,6 +1024,7 @@ public final class ModSba { */ public static final SimpleOption TREVOR_SHOW_QUEST_COOLDOWN = SimpleOption.builder() .node("sba", "trevor-show-quest-cooldown").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScoreboard.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScoreboard.java index e736bca12..12732e7dc 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScoreboard.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScoreboard.java @@ -42,6 +42,7 @@ public final class ModScoreboard { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("scoreboard", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModScoreboard { */ public static final NumberOption SCALE = NumberOption.number() .node("scoreboard", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModScoreboard { */ public static final SimpleOption NUMBERS = SimpleOption.builder() .node("scoreboard", "numbers").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -73,16 +76,19 @@ public final class ModScoreboard { */ public static final SimpleOption HIDE_SCOREBOARD = SimpleOption.builder() .node("scoreboard", "hide-scoreboard").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("scoreboard", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -94,6 +100,7 @@ public final class ModScoreboard { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("scoreboard", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -104,6 +111,7 @@ public final class ModScoreboard { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("scoreboard", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -114,6 +122,7 @@ public final class ModScoreboard { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("scoreboard", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 80)) .notifyClient() .build(); @@ -124,6 +133,7 @@ public final class ModScoreboard { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("scoreboard", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScreenshot.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScreenshot.java index 83657736f..478ed138c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScreenshot.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScreenshot.java @@ -40,6 +40,7 @@ public final class ModScreenshot { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("screenshot", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModScreenshot { */ public static final SimpleOption COPY_AUTOMATICALLY = SimpleOption.builder() .node("screenshot", "copy-automatically").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -60,6 +62,7 @@ public final class ModScreenshot { */ public static final SimpleOption UPLOAD_OPTION = SimpleOption.builder() .node("screenshot", "upload-option").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -70,6 +73,7 @@ public final class ModScreenshot { */ public static final SimpleOption TWEET_OPTION = SimpleOption.builder() .node("screenshot", "tweet-option").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -80,6 +84,7 @@ public final class ModScreenshot { */ public static final SimpleOption COPY_OPTION = SimpleOption.builder() .node("screenshot", "copy-option").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -91,6 +96,7 @@ public final class ModScreenshot { public static final SimpleOption WORLD_DETAILS = SimpleOption.builder() .comment("A screenshot file saved with world details enabled has metadata that contains your player coordinates, the biome, and more.") .node("screenshot", "world-details").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScrollableTooltips.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScrollableTooltips.java index 13e766222..fa6c1f6b7 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScrollableTooltips.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModScrollableTooltips.java @@ -23,6 +23,7 @@ */ package com.lunarclient.apollo.mods.impl; +import com.lunarclient.apollo.option.NumberOption; import com.lunarclient.apollo.option.SimpleOption; import io.leangen.geantyref.TypeToken; @@ -40,16 +41,19 @@ public final class ModScrollableTooltips { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("scrollable-tooltips", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * When a tooltip is sufficiently long, overflow off the bottom/right of the screen instead of the top/left. * * @since 1.0.0 */ public static final SimpleOption START_AT_TOP = SimpleOption.builder() + .comment("When a tooltip is sufficiently long, overflow off the bottom/right of the screen instead of the top/left.") .node("scrollable-tooltips", "start-at-top").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -60,6 +64,31 @@ public final class ModScrollableTooltips { */ public static final SimpleOption VERTICAL_KEYBIND = SimpleOption.builder() .node("scrollable-tooltips", "vertical-keybind").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final NumberOption TOOLTIP_SCALE = NumberOption.number() + .node("scrollable-tooltips", "tooltip-scale").type(TypeToken.get(Float.class)) + .min(0.25F).max(2.5F) + .defaultValue(1.0F) + .notifyClient() + .build(); + + /** + * Let the user scroll whenever they want, regardless of whether or not a tooltip is sufficiently large. + * + * @since 1.2.1 + */ + public static final SimpleOption TOOLTIP_FREE_SCROLL = SimpleOption.builder() + .comment("Let the user scroll whenever they want, regardless of whether or not a tooltip is sufficiently large.") + .node("scrollable-tooltips", "tooltip-free-scroll").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -68,6 +97,7 @@ public final class ModScrollableTooltips { * * @since 1.0.0 */ + @Deprecated public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() .node("scrollable-tooltips", "text-shadow").type(TypeToken.get(Boolean.class)) .notifyClient() @@ -78,6 +108,7 @@ public final class ModScrollableTooltips { * * @since 1.0.0 */ + @Deprecated public static final SimpleOption WRAP_TEXT = SimpleOption.builder() .node("scrollable-tooltips", "wrap-text").type(TypeToken.get(Boolean.class)) .notifyClient() diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModServerAddress.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModServerAddress.java index 90835cc46..8caa3784d 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModServerAddress.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModServerAddress.java @@ -42,6 +42,7 @@ public final class ModServerAddress { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("server-address", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModServerAddress { */ public static final NumberOption SCALE = NumberOption.number() .node("server-address", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -61,8 +63,21 @@ public final class ModServerAddress { * * @since 1.0.0 */ + public static final SimpleOption SERVER_ICON = SimpleOption.builder() + .node("server-address", "server-icon").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. + * + * @since 1.0.0 + */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("server-address", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +88,7 @@ public final class ModServerAddress { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("server-address", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +99,7 @@ public final class ModServerAddress { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("server-address", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +110,7 @@ public final class ModServerAddress { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("server-address", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +122,7 @@ public final class ModServerAddress { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("server-address", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +134,7 @@ public final class ModServerAddress { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("server-address", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +146,7 @@ public final class ModServerAddress { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("server-address", "background-width").type(TypeToken.get(Integer.class)) .min(40).max(62) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +158,7 @@ public final class ModServerAddress { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("server-address", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +169,7 @@ public final class ModServerAddress { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("server-address", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +181,7 @@ public final class ModServerAddress { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("server-address", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +192,7 @@ public final class ModServerAddress { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("server-address", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +203,7 @@ public final class ModServerAddress { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("server-address", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,16 +214,7 @@ public final class ModServerAddress { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("server-address", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption SERVER_ICON = SimpleOption.builder() - .node("server-address", "server-icon").type(TypeToken.get(Boolean.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShinyPots.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShinyPots.java index 257ecbfab..53a38c692 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShinyPots.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShinyPots.java @@ -40,6 +40,7 @@ public final class ModShinyPots { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("shiny-pots", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModShinyPots { */ public static final SimpleOption COLORED_POTIONS = SimpleOption.builder() .node("shiny-pots", "colored-potions").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -60,6 +62,7 @@ public final class ModShinyPots { */ public static final SimpleOption RENDER_GLINT_BEHIND_POTION = SimpleOption.builder() .node("shiny-pots", "render-glint-behind-potion").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -70,6 +73,7 @@ public final class ModShinyPots { */ public static final SimpleOption RENDER_ENTIRE_SLOT = SimpleOption.builder() .node("shiny-pots", "render-entire-slot").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShulkerPreview.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShulkerPreview.java index 88f89eb36..92add2a6d 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShulkerPreview.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModShulkerPreview.java @@ -40,6 +40,7 @@ public final class ModShulkerPreview { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("shulker-preview", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -50,6 +51,7 @@ public final class ModShulkerPreview { */ public static final SimpleOption ALWAYS_PREVIEW = SimpleOption.builder() .node("shulker-preview", "always-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -60,6 +62,7 @@ public final class ModShulkerPreview { */ public static final SimpleOption COLORED_SHULKER_PREVIEW = SimpleOption.builder() .node("shulker-preview", "colored-shulker-preview").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSkyblock.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSkyblock.java index e02fa3c99..00ac0cf4c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSkyblock.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSkyblock.java @@ -26,6 +26,7 @@ import com.lunarclient.apollo.option.NumberOption; import com.lunarclient.apollo.option.SimpleOption; import io.leangen.geantyref.TypeToken; +import java.awt.Color; /** * Various features to help in Hypixel Skyblock. @@ -41,6 +42,7 @@ public final class ModSkyblock { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("skyblock", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,56 +54,66 @@ public final class ModSkyblock { public static final NumberOption SKYBLOCK_ALERT_SCALE = NumberOption.number() .node("skyblock", "skyblock-alert-scale").type(TypeToken.get(Float.class)) .min(0.2F).max(2.5F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Automatically copies rare drops and pet drops to the clipboard. * * @since 1.0.9 */ - public static final SimpleOption SKYBLOCK_HIDE_HUNGER = SimpleOption.builder() - .node("skyblock", "skyblock-hide-hunger").type(TypeToken.get(Boolean.class)) + public static final SimpleOption AUTO_COPY_RARE_DROPS = SimpleOption.builder() + .comment("Automatically copies rare drops and pet drops to the clipboard.") + .node("skyblock", "auto-copy-rare-drops").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Replaces left clicks in menus with a middle click. Hold control to override. * - * @since 1.0.9 + * @since 1.1.9 */ - public static final SimpleOption SKYBLOCK_HIDE_ARMOR = SimpleOption.builder() - .node("skyblock", "skyblock-hide-armor").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKY_BLOCK_MIDDLE_CLICK_ITEMS = SimpleOption.builder() + .comment("Replaces left clicks in menus with a middle click. Hold control to override.") + .node("skyblock", "sky-block-middle-click-items").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Shows the creation date of the item in the lore. * - * @since 1.1.3 + * @since 1.1.7 */ - public static final SimpleOption SKYBLOCK_HIDE_HEARTS = SimpleOption.builder() - .node("skyblock", "skyblock-hide-hearts").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKY_BLOCK_CREATION_DATE = SimpleOption.builder() + .comment("Shows the creation date of the item in the lore.") + .node("skyblock", "sky-block-creation-date").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Shows the item's SkyBlock ID in the lore. * - * @since 1.1.3 + * @since 1.1.7 */ - public static final SimpleOption SKYBLOCK_HIDE_ABSORB = SimpleOption.builder() - .node("skyblock", "skyblock-hide-absorb").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKY_BLOCK_ITEM_ID = SimpleOption.builder() + .comment("Shows the item's SkyBlock ID in the lore.") + .node("skyblock", "sky-block-item-id").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** * No documentation available. * - * @since 1.0.9 + * @since 1.2.1 */ - public static final SimpleOption HIDE_MIDAS_STAFF = SimpleOption.builder() - .node("skyblock", "hide-midas-staff").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_BOW_REEQUIP = SimpleOption.builder() + .node("skyblock", "skyblock-bow-reequip").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -110,136 +122,122 @@ public final class ModSkyblock { * * @since 1.0.9 */ - public static final SimpleOption HIDE_FALLING_BLOCKS = SimpleOption.builder() - .node("skyblock", "hide-falling-blocks").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_HIDE_HUNGER = SimpleOption.builder() + .node("skyblock", "skyblock-hide-hunger").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * Automatically copies rare drops and pet drops to the clipboard. + * No documentation available. * * @since 1.0.9 */ - public static final SimpleOption AUTO_COPY_RARE_DROPS = SimpleOption.builder() - .comment("Automatically copies rare drops and pet drops to the clipboard.") - .node("skyblock", "auto-copy-rare-drops").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * Hides the hud previews in the edit hud layout menu if you're not currently on SkyBlock. - * - * @since 1.1.1 - */ - public static final SimpleOption ONLY_MOVERS_ON_SKYBLOCK = SimpleOption.builder() - .comment("Hides the hud previews in the edit hud layout menu if you're not currently on SkyBlock.") - .node("skyblock", "only-movers-on-skyblock").type(TypeToken.get(Boolean.class)) - .notifyClient() - .build(); - - /** - * Provides QOL for the Diana mayor that helps the user quickly locate burrows. - * - * @since 1.1.5 - */ - public static final SimpleOption GRIFFIN_BURROW_ESTIMATES = SimpleOption.builder() - .comment("Provides QOL for the Diana mayor that helps the user quickly locate burrows.") - .node("skyblock", "griffin-burrow-estimates").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_HIDE_ARMOR = SimpleOption.builder() + .node("skyblock", "skyblock-hide-armor").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * Replaces left clicks in menus with a middle click. Hold control to override. + * No documentation available. * - * @since 1.1.9 + * @since 1.1.3 */ - public static final SimpleOption SKY_BLOCK_MIDDLE_CLICK_ITEMS = SimpleOption.builder() - .comment("Replaces left clicks in menus with a middle click. Hold control to override.") - .node("skyblock", "sky-block-middle-click-items").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_HIDE_HEARTS = SimpleOption.builder() + .node("skyblock", "skyblock-hide-hearts").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * Shows the creation date of the item in the lore. + * No documentation available. * - * @since 1.1.7 + * @since 1.1.3 */ - public static final SimpleOption SKY_BLOCK_CREATION_DATE = SimpleOption.builder() - .comment("Shows the creation date of the item in the lore.") - .node("skyblock", "sky-block-creation-date").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_HIDE_ABSORB = SimpleOption.builder() + .node("skyblock", "skyblock-hide-absorb").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * Shows the item's SkyBlock ID in the lore. + * Hides the hud previews in the edit hud layout menu if you're not currently on SkyBlock. * - * @since 1.1.7 + * @since 1.1.1 */ - public static final SimpleOption SKY_BLOCK_ITEM_ID = SimpleOption.builder() - .comment("Shows the item's SkyBlock ID in the lore.") - .node("skyblock", "sky-block-item-id").type(TypeToken.get(Boolean.class)) + public static final SimpleOption ONLY_MOVERS_ON_SKYBLOCK = SimpleOption.builder() + .comment("Hides the hud previews in the edit hud layout menu if you're not currently on SkyBlock.") + .node("skyblock", "only-movers-on-skyblock").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** * No documentation available. * - * @since 1.1.8 + * @since 1.2.1 */ - public static final SimpleOption HIGHLIGHT_END_NODES = SimpleOption.builder() - .node("skyblock", "highlight-end-nodes").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_SUBJECT_COLOR = SimpleOption.builder() + .node("skyblock", "skyblock-subject-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 170, 0)) .notifyClient() .build(); /** * No documentation available. * - * @since 1.1.8 + * @since 1.2.1 */ - public static final SimpleOption HIGHLIGHT_GLOWING_MUSHROOMS = SimpleOption.builder() - .node("skyblock", "highlight-glowing-mushrooms").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_SEPARATOR_COLOR = SimpleOption.builder() + .node("skyblock", "skyblock-separator-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); /** * No documentation available. * - * @since 1.1.9 + * @since 1.2.1 */ - public static final SimpleOption SB_MENU_CLICK_TO_COMMAND = SimpleOption.builder() - .node("skyblock", "sb-menu-click-to-command").type(TypeToken.get(Boolean.class)) + public static final SimpleOption SKYBLOCK_VALUE_COLOR = SimpleOption.builder() + .node("skyblock", "skyblock-value-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(170, 170, 170)) .notifyClient() .build(); /** - * Makes Giant HP more visible by showing their HP at their feet. + * Provides QOL for the Diana mayor that helps the user quickly locate burrows. * * @since 1.1.5 */ - public static final SimpleOption SHOW_GIANT_HPAT_FEET = SimpleOption.builder() - .comment("Makes Giant HP more visible by showing their HP at their feet.") - .node("skyblock", "show-giant-h-p-at-feet").type(TypeToken.get(Boolean.class)) + public static final SimpleOption GRIFFIN_BURROW_ESTIMATES = SimpleOption.builder() + .comment("Provides QOL for the Diana mayor that helps the user quickly locate burrows.") + .node("skyblock", "griffin-burrow-estimates").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Changes crop hitboxes with their 1.12+ variant. Only enabled on Hypixel or singleplayer. * - * @since 1.1.9 + * @since 1.0.9 */ - public static final SimpleOption SKYBLOCK_SECRETS_COLLECTED = SimpleOption.builder() - .node("skyblock", "skyblock-secrets-collected").type(TypeToken.get(Boolean.class)) + public static final SimpleOption TALLER_CROPS = SimpleOption.builder() + .comment("Changes crop hitboxes with their 1.12+ variant. Only enabled on Hypixel or singleplayer.") + .node("skyblock", "taller-crops").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * Changes crop hitboxes with their 1.12+ variant. Only enabled on Hypixel or singleplayer. + * No documentation available. * - * @since 1.0.9 + * @since 1.1.8 */ - public static final SimpleOption TALLER_CROPS = SimpleOption.builder() - .comment("Changes crop hitboxes with their 1.12+ variant. Only enabled on Hypixel or singleplayer.") - .node("skyblock", "taller-crops").type(TypeToken.get(Boolean.class)) + public static final SimpleOption HIGHLIGHT_GLOWING_MUSHROOMS = SimpleOption.builder() + .node("skyblock", "highlight-glowing-mushrooms").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -250,6 +248,7 @@ public final class ModSkyblock { */ public static final SimpleOption SKY_BLOCK_WISHING_COMPASS = SimpleOption.builder() .node("skyblock", "sky-block-wishing-compass").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -260,6 +259,7 @@ public final class ModSkyblock { */ public static final SimpleOption SKY_BLOCK_METAL_DETECTOR = SimpleOption.builder() .node("skyblock", "sky-block-metal-detector").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -270,6 +270,7 @@ public final class ModSkyblock { */ public static final SimpleOption SKY_BLOCK_FINISHED_COMMISSIONS = SimpleOption.builder() .node("skyblock", "sky-block-finished-commissions").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -281,6 +282,7 @@ public final class ModSkyblock { public static final SimpleOption FIX_LAVA_BOBBER = SimpleOption.builder() .comment("Fixes your fishing bobber sinking in lava.") .node("skyblock", "fix-lava-bobber").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -292,6 +294,7 @@ public final class ModSkyblock { public static final SimpleOption REPLACE_LAVA_WITH_WATER_CRIMSON = SimpleOption.builder() .comment("Changes the texture of lava to water in the Crimson Isles and Kuudra.") .node("skyblock", "replace-lava-with-water-crimson").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -303,6 +306,7 @@ public final class ModSkyblock { public static final SimpleOption REPLACE_LAVA_WITH_WATER_EVERYWHERE = SimpleOption.builder() .comment("Changes the texture of lava to water everywhere in SkyBlock.") .node("skyblock", "replace-lava-with-water-everywhere").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -314,6 +318,7 @@ public final class ModSkyblock { public static final SimpleOption SKYBLOCK_FISHING_HIDE_PLAYERS = SimpleOption.builder() .comment("Hides players and fishing rods near your bobber while you are fishing.") .node("skyblock", "skyblock-fishing-hide-players").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -325,6 +330,7 @@ public final class ModSkyblock { public static final SimpleOption SKYBLOCK_FISHING_HOTSPOT_LOCATOR = SimpleOption.builder() .comment("Shows which hotspot the Hotspot Radar item is pointing to.") .node("skyblock", "skyblock-fishing-hotspot-locator").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -336,6 +342,7 @@ public final class ModSkyblock { public static final SimpleOption SLAYER_BOSS_TIMER = SimpleOption.builder() .comment("Provides a chat message on boss kill that tells you how long it took to kill!") .node("skyblock", "slayer-boss-timer").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -346,6 +353,7 @@ public final class ModSkyblock { */ public static final SimpleOption SLAYER_MINI_BOSS_ALERT = SimpleOption.builder() .node("skyblock", "slayer-mini-boss-alert").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -357,6 +365,7 @@ public final class ModSkyblock { public static final SimpleOption INACTIVE_EFFIGY_WAYPOINTS = SimpleOption.builder() .comment("Used in Stillgore of the Rift, this feature tells you where to go to refresh the duration of inactive Effigies.") .node("skyblock", "inactive-effigy-waypoints").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -368,6 +377,7 @@ public final class ModSkyblock { public static final SimpleOption VAMPIRE_STEAK_DISPLAY = SimpleOption.builder() .comment("Highlights a boss when it can be 1 tapped using steak stake.") .node("skyblock", "vampire-steak-display").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -379,6 +389,7 @@ public final class ModSkyblock { public static final SimpleOption VAMPIRE_ICHOR_DISPLAY = SimpleOption.builder() .comment("Highlights blood ichors present during T5 Bloodfiends") .node("skyblock", "vampire-ichor-display").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -390,6 +401,7 @@ public final class ModSkyblock { public static final SimpleOption GRAVITY_WELL_WAYPOINTS = SimpleOption.builder() .comment("Shows the positions where you can trap the gray blazes.") .node("skyblock", "gravity-well-waypoints").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -400,6 +412,87 @@ public final class ModSkyblock { */ public static final SimpleOption SHOW_KUUDRA_HEALTH = SimpleOption.builder() .node("skyblock", "show-kuudra-health").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.8 + */ + public static final SimpleOption HIGHLIGHT_END_NODES = SimpleOption.builder() + .node("skyblock", "highlight-end-nodes").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * Makes Giant HP more visible by showing their HP at their feet. + * + * @since 1.1.5 + */ + public static final SimpleOption SHOW_GIANT_HPAT_FEET = SimpleOption.builder() + .comment("Makes Giant HP more visible by showing their HP at their feet.") + .node("skyblock", "show-giant-h-p-at-feet").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * Makes Professor's Guardians HP more visible. + * + * @since 1.2.1 + */ + public static final SimpleOption SHOW_PROFESSOR_GUARDIAN_HP = SimpleOption.builder() + .comment("Makes Professor's Guardians HP more visible.") + .node("skyblock", "show-professor-guardian-h-p").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption SKYBLOCK_DUNGEON_QUALITY = SimpleOption.builder() + .node("skyblock", "skyblock-dungeon-quality").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.1.9 + */ + public static final SimpleOption SKYBLOCK_SECRETS_COLLECTED = SimpleOption.builder() + .node("skyblock", "skyblock-secrets-collected").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption SKYBLOCK_HIDE_NON_STARRED = SimpleOption.builder() + .node("skyblock", "skyblock-hide-non-starred").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * Shows how long it takes to do each terminal stage in chat (and also Simon Says)!. + * + * @since 1.2.1 + */ + public static final SimpleOption SKYBLOCK_TERMINAL_SPLIT_TIMERS = SimpleOption.builder() + .comment("Shows how long it takes to do each terminal stage in chat (and also Simon Says)!") + .node("skyblock", "skyblock-terminal-split-timers").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -412,6 +505,29 @@ public final class ModSkyblock { .comment("Provides a general line thickness option that applies to most features with box/line rendering.") .node("skyblock", "skyblock-line-thickness").type(TypeToken.get(Float.class)) .min(1.0F).max(10.0F) + .defaultValue(4.0F) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.0.9 + */ + public static final SimpleOption HIDE_MIDAS_STAFF = SimpleOption.builder() + .node("skyblock", "hide-midas-staff").type(TypeToken.get(Boolean.class)) + .defaultValue(false) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.0.9 + */ + public static final SimpleOption HIDE_FALLING_BLOCKS = SimpleOption.builder() + .node("skyblock", "hide-falling-blocks").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -422,6 +538,19 @@ public final class ModSkyblock { */ public static final SimpleOption SKYBLOCK_USE_TICK_TIMERS = SimpleOption.builder() .node("skyblock", "skyblock-use-tick-timers").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * Routes menu clicks to /sbmenu command in order to prevent sticky item. + * + * @since 1.1.9 + */ + public static final SimpleOption SB_MENU_CLICK_TO_COMMAND = SimpleOption.builder() + .comment("Routes menu clicks to /sbmenu command in order to prevent sticky item.") + .node("skyblock", "sb-menu-click-to-command").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSnaplook.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSnaplook.java index fb73a03d9..b0045f9be 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSnaplook.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSnaplook.java @@ -40,6 +40,7 @@ public final class ModSnaplook { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("snaplook", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModSnaplook { public static final SimpleOption SMOOTH_CAMERA = SimpleOption.builder() .comment("When zoomed in the camera movement will move smoothly (cinematic camera)") .node("snaplook", "smooth-camera").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -62,6 +64,7 @@ public final class ModSnaplook { public static final SimpleOption SNAPLOOK_TOGGLE_MODE = SimpleOption.builder() .comment("This feature uses press and hold by default. Useful if you want to bypass a certain camera orientation.") .node("snaplook", "snaplook-toggle-mode").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSoundChanger.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSoundChanger.java index f8ae8d279..1d24999d2 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSoundChanger.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModSoundChanger.java @@ -40,6 +40,7 @@ public final class ModSoundChanger { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("sound-changer", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModStopwatch.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModStopwatch.java index 4eeca98e3..488c5ed88 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModStopwatch.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModStopwatch.java @@ -42,6 +42,7 @@ public final class ModStopwatch { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("stopwatch", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModStopwatch { */ public static final NumberOption SCALE = NumberOption.number() .node("stopwatch", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -61,8 +63,21 @@ public final class ModStopwatch { * * @since 1.0.0 */ + public static final SimpleOption RESET_EVERY_START = SimpleOption.builder() + .node("stopwatch", "reset-every-start").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * Adds a shadow to text. + * + * @since 1.0.0 + */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("stopwatch", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -73,6 +88,7 @@ public final class ModStopwatch { */ public static final SimpleOption BRACKETS = SimpleOption.builder() .node("stopwatch", "brackets").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,6 +99,7 @@ public final class ModStopwatch { */ public static final SimpleOption BRACKET_COLOR = SimpleOption.builder() .node("stopwatch", "bracket-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +110,7 @@ public final class ModStopwatch { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("stopwatch", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +122,7 @@ public final class ModStopwatch { public static final SimpleOption STATIC_BACKGROUND_WIDTH = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("stopwatch", "static-background-width").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +134,7 @@ public final class ModStopwatch { public static final SimpleOption STATIC_BACKGROUND_HEIGHT = SimpleOption.builder() .comment("If this is disabled the background will change size with the text.") .node("stopwatch", "static-background-height").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -126,6 +146,7 @@ public final class ModStopwatch { public static final NumberOption BACKGROUND_WIDTH = NumberOption.number() .node("stopwatch", "background-width").type(TypeToken.get(Integer.class)) .min(44).max(120) + .defaultValue(56) .notifyClient() .build(); @@ -137,6 +158,7 @@ public final class ModStopwatch { public static final NumberOption BACKGROUND_HEIGHT = NumberOption.number() .node("stopwatch", "background-height").type(TypeToken.get(Integer.class)) .min(10).max(22) + .defaultValue(18) .notifyClient() .build(); @@ -147,6 +169,7 @@ public final class ModStopwatch { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("stopwatch", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -158,6 +181,7 @@ public final class ModStopwatch { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("stopwatch", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -168,6 +192,7 @@ public final class ModStopwatch { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("stopwatch", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -178,6 +203,7 @@ public final class ModStopwatch { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("stopwatch", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 111)) .notifyClient() .build(); @@ -188,16 +214,7 @@ public final class ModStopwatch { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("stopwatch", "text-color").type(TypeToken.get(Color.class)) - .notifyClient() - .build(); - - /** - * No documentation available. - * - * @since 1.0.0 - */ - public static final SimpleOption RESET_EVERY_START = SimpleOption.builder() - .node("stopwatch", "reset-every-start").type(TypeToken.get(Boolean.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTab.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTab.java index 4caa91eff..1bf39e56e 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTab.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTab.java @@ -41,6 +41,7 @@ public final class ModTab { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("tab", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModTab { public static final SimpleOption TOGGLE_KEY_TAB = SimpleOption.builder() .comment("Quickly pressing and releasing the key will toggle tab") .node("tab", "toggle-key-tab").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -60,8 +62,9 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption HEADER_COLOR = SimpleOption.builder() - .node("tab", "header-color").type(TypeToken.get(Color.class)) + public static final SimpleOption DISABLE_HEADER = SimpleOption.builder() + .node("tab", "disable-header").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -70,8 +73,9 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption FOOTER_COLOR = SimpleOption.builder() - .node("tab", "footer-color").type(TypeToken.get(Color.class)) + public static final SimpleOption DISPLAY_PLAYER_HEAD = SimpleOption.builder() + .node("tab", "display-player-head").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -80,18 +84,21 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() - .node("tab", "background-color").type(TypeToken.get(Color.class)) + public static final SimpleOption DISABLE_FOOTER = SimpleOption.builder() + .node("tab", "disable-footer").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Hide Hypixel NPC on tab. * * @since 1.0.0 */ - public static final SimpleOption PING_ROW = SimpleOption.builder() - .node("tab", "ping-row").type(TypeToken.get(Boolean.class)) + public static final SimpleOption HIDE_NPC = SimpleOption.builder() + .comment("Hide Hypixel NPC on tab") + .node("tab", "hide-n-p-c").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -100,8 +107,9 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption ROWS_COLOR = SimpleOption.builder() - .node("tab", "rows-color").type(TypeToken.get(Color.class)) + public static final SimpleOption SHOW_LUNAR_ICONS_ON_RIGHT = SimpleOption.builder() + .node("tab", "show-lunar-icons-on-right").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -110,8 +118,9 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption DISABLE_HEADER = SimpleOption.builder() - .node("tab", "disable-header").type(TypeToken.get(Boolean.class)) + public static final SimpleOption HEADER_COLOR = SimpleOption.builder() + .node("tab", "header-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 128)) .notifyClient() .build(); @@ -120,8 +129,9 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption DISPLAY_PLAYER_HEAD = SimpleOption.builder() - .node("tab", "display-player-head").type(TypeToken.get(Boolean.class)) + public static final SimpleOption FOOTER_COLOR = SimpleOption.builder() + .node("tab", "footer-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 128)) .notifyClient() .build(); @@ -130,19 +140,20 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption DISABLE_FOOTER = SimpleOption.builder() - .node("tab", "disable-footer").type(TypeToken.get(Boolean.class)) + public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() + .node("tab", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 128)) .notifyClient() .build(); /** - * Hide Hypixel NPC on tab. + * No documentation available. * * @since 1.0.0 */ - public static final SimpleOption HIDE_NPC = SimpleOption.builder() - .comment("Hide Hypixel NPC on tab") - .node("tab", "hide-n-p-c").type(TypeToken.get(Boolean.class)) + public static final SimpleOption PING_ROW = SimpleOption.builder() + .node("tab", "ping-row").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -151,8 +162,9 @@ public final class ModTab { * * @since 1.0.0 */ - public static final SimpleOption SHOW_LUNAR_ICONS_ON_RIGHT = SimpleOption.builder() - .node("tab", "show-lunar-icons-on-right").type(TypeToken.get(Boolean.class)) + public static final SimpleOption ROWS_COLOR = SimpleOption.builder() + .node("tab", "rows-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 32)) .notifyClient() .build(); @@ -163,6 +175,7 @@ public final class ModTab { */ public static final SimpleOption HIGHLIGHT_OWN_NAME = SimpleOption.builder() .node("tab", "highlight-own-name").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -173,6 +186,7 @@ public final class ModTab { */ public static final SimpleOption NAME_COLOR = SimpleOption.builder() .node("tab", "name-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 0, 0)) .notifyClient() .build(); @@ -183,6 +197,18 @@ public final class ModTab { */ public static final SimpleOption NAME_SHADOW = SimpleOption.builder() .node("tab", "name-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption MOVE_SELF_TO_TOP = SimpleOption.builder() + .node("tab", "move-self-to-top").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -193,6 +219,7 @@ public final class ModTab { */ public static final SimpleOption HIDE_PING = SimpleOption.builder() .node("tab", "hide-ping").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -203,6 +230,7 @@ public final class ModTab { */ public static final SimpleOption HIDE_PING_IF_OVER_500 = SimpleOption.builder() .node("tab", "hide-ping-if-over500").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -213,6 +241,7 @@ public final class ModTab { */ public static final SimpleOption DISPLAY_PING_AS_NUMBER = SimpleOption.builder() .node("tab", "display-ping-as-number").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -223,6 +252,7 @@ public final class ModTab { */ public static final SimpleOption PING_NUMBER_SHADOW = SimpleOption.builder() .node("tab", "ping-number-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -233,6 +263,7 @@ public final class ModTab { */ public static final SimpleOption DYNAMIC_PING_COLOR = SimpleOption.builder() .node("tab", "dynamic-ping-color").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -243,6 +274,7 @@ public final class ModTab { */ public static final SimpleOption LOW_PING_NUMBER_COLOR = SimpleOption.builder() .node("tab", "low-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(85, 255, 85)) .notifyClient() .build(); @@ -253,6 +285,7 @@ public final class ModTab { */ public static final SimpleOption MEDIUM_PING_NUMBER_COLOR = SimpleOption.builder() .node("tab", "medium-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); @@ -263,6 +296,7 @@ public final class ModTab { */ public static final SimpleOption HIGH_PING_NUMBER_COLOR = SimpleOption.builder() .node("tab", "high-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 85, 85)) .notifyClient() .build(); @@ -273,6 +307,7 @@ public final class ModTab { */ public static final SimpleOption EXTREME_PING_NUMBER_COLOR = SimpleOption.builder() .node("tab", "extreme-ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(170, 0, 0)) .notifyClient() .build(); @@ -283,6 +318,7 @@ public final class ModTab { */ public static final SimpleOption PING_NUMBER_COLOR = SimpleOption.builder() .node("tab", "ping-number-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTeamView.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTeamView.java index 5427869ac..8212a921d 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTeamView.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTeamView.java @@ -40,6 +40,7 @@ public final class ModTeamView { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("team-view", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTierTagger.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTierTagger.java index 54d826096..b749d8fd5 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTierTagger.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTierTagger.java @@ -25,6 +25,7 @@ import com.lunarclient.apollo.option.SimpleOption; import io.leangen.geantyref.TypeToken; +import java.awt.Color; /** * Show player's PvP tier on their Name Tag. @@ -40,6 +41,7 @@ public final class ModTierTagger { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("tier-tagger", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -50,6 +52,7 @@ public final class ModTierTagger { */ public static final SimpleOption MC_TIERS_FORMAT = SimpleOption.builder() .node("tier-tagger", "mc-tiers-format").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -60,6 +63,7 @@ public final class ModTierTagger { */ public static final SimpleOption SUFFIX = SimpleOption.builder() .node("tier-tagger", "suffix").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -70,6 +74,7 @@ public final class ModTierTagger { */ public static final SimpleOption SEPARATE_NAMETAG = SimpleOption.builder() .node("tier-tagger", "separate-nametag").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -80,6 +85,7 @@ public final class ModTierTagger { */ public static final SimpleOption SHOW_GM_ICONS = SimpleOption.builder() .node("tier-tagger", "show-gm-icons").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -90,6 +96,7 @@ public final class ModTierTagger { */ public static final SimpleOption SHOW_RETIRED = SimpleOption.builder() .node("tier-tagger", "show-retired").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -100,6 +107,117 @@ public final class ModTierTagger { */ public static final SimpleOption SHOW_REGION = SimpleOption.builder() .node("tier-tagger", "show-region").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_HT1 = SimpleOption.builder() + .node("tier-tagger", "color-h-t1").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 207, 74)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_LT1 = SimpleOption.builder() + .node("tier-tagger", "color-l-t1").type(TypeToken.get(Color.class)) + .defaultValue(new Color(213, 179, 85)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_HT2 = SimpleOption.builder() + .node("tier-tagger", "color-h-t2").type(TypeToken.get(Color.class)) + .defaultValue(new Color(164, 179, 199)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_LT2 = SimpleOption.builder() + .node("tier-tagger", "color-l-t2").type(TypeToken.get(Color.class)) + .defaultValue(new Color(136, 141, 149)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_HT3 = SimpleOption.builder() + .node("tier-tagger", "color-h-t3").type(TypeToken.get(Color.class)) + .defaultValue(new Color(221, 136, 73)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_LT3 = SimpleOption.builder() + .node("tier-tagger", "color-l-t3").type(TypeToken.get(Color.class)) + .defaultValue(new Color(179, 104, 48)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_HT4 = SimpleOption.builder() + .node("tier-tagger", "color-h-t4").type(TypeToken.get(Color.class)) + .defaultValue(new Color(101, 91, 121)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_LT4 = SimpleOption.builder() + .node("tier-tagger", "color-l-t4").type(TypeToken.get(Color.class)) + .defaultValue(new Color(101, 91, 121)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_HT5 = SimpleOption.builder() + .node("tier-tagger", "color-h-t5").type(TypeToken.get(Color.class)) + .defaultValue(new Color(101, 91, 121)) + .notifyClient() + .build(); + + /** + * No documentation available. + * + * @since 1.2.1 + */ + public static final SimpleOption COLOR_LT5 = SimpleOption.builder() + .node("tier-tagger", "color-l-t5").type(TypeToken.get(Color.class)) + .defaultValue(new Color(101, 91, 121)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTimeChanger.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTimeChanger.java index ec209a13a..9d07a7a69 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTimeChanger.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTimeChanger.java @@ -41,6 +41,7 @@ public final class ModTimeChanger { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("time-changer", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModTimeChanger { public static final NumberOption TIME_CHANGER_TIME = NumberOption.number() .node("time-changer", "time-changer-time").type(TypeToken.get(Integer.class)) .min(0).max(24000) + .defaultValue(12000) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModTimeChanger { public static final NumberOption HORIZON_YLEVEL = NumberOption.number() .node("time-changer", "horizon-y-level").type(TypeToken.get(Integer.class)) .min(0).max(63) + .defaultValue(63) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModTimeChanger { */ public static final SimpleOption USE_REAL_TIME = SimpleOption.builder() .node("time-changer", "use-real-time").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModTimeChanger { */ public static final SimpleOption TIME_PASSAGE = SimpleOption.builder() .node("time-changer", "time-passage").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -94,6 +99,7 @@ public final class ModTimeChanger { public static final NumberOption SPEED = NumberOption.number() .node("time-changer", "speed").type(TypeToken.get(Integer.class)) .min(0).max(20) + .defaultValue(1) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTitles.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTitles.java index 93e99f52c..87b74444c 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTitles.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTitles.java @@ -42,6 +42,7 @@ public final class ModTitles { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("titles", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModTitles { public static final NumberOption SCALE = NumberOption.number() .node("titles", "scale").type(TypeToken.get(Float.class)) .min(0.5F).max(1.5F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModTitles { */ public static final SimpleOption SHOW_IN_HUD_EDITOR = SimpleOption.builder() .node("titles", "show-in-hud-editor").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModTitles { */ public static final SimpleOption TITLE_COLOR = SimpleOption.builder() .node("titles", "title-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 85, 85)) .notifyClient() .build(); @@ -83,6 +87,7 @@ public final class ModTitles { */ public static final SimpleOption SUBTITLE_COLOR = SimpleOption.builder() .node("titles", "subtitle-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -93,6 +98,7 @@ public final class ModTitles { */ public static final SimpleOption USE_MINECRAFT_GUISCALE = SimpleOption.builder() .node("titles", "use-minecraft-g-u-i-scale").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -104,6 +110,7 @@ public final class ModTitles { public static final SimpleOption KEEP_TITLE_CENTERED = SimpleOption.builder() .comment("Keep the title centered around the center of the mod on-screen") .node("titles", "keep-title-centered").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -115,6 +122,7 @@ public final class ModTitles { public static final SimpleOption SHOW_TITLE = SimpleOption.builder() .comment("Show title of height limit display") .node("titles", "show-title").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -125,6 +133,7 @@ public final class ModTitles { */ public static final SimpleOption SHOW_SUBTITLE = SimpleOption.builder() .node("titles", "show-subtitle").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTntCountdown.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTntCountdown.java index f66f24378..68abeacf6 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTntCountdown.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTntCountdown.java @@ -42,6 +42,7 @@ public final class ModTntCountdown { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("tnt-countdown", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -54,6 +55,7 @@ public final class ModTntCountdown { .comment("Offset the default tnt delay in ticks. 1 second is 20 ticks") .node("tnt-countdown", "adjust-fuse-time").type(TypeToken.get(Integer.class)) .min(-80).max(80) + .defaultValue(0) .notifyClient() .build(); @@ -64,16 +66,19 @@ public final class ModTntCountdown { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("tnt-countdown", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("tnt-countdown", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -85,6 +90,7 @@ public final class ModTntCountdown { public static final SimpleOption STATIC_COUNTDOWN_COLOR = SimpleOption.builder() .comment("Should the color stay the same the entire time.") .node("tnt-countdown", "static-countdown-color").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -95,6 +101,7 @@ public final class ModTntCountdown { */ public static final SimpleOption COLOR = SimpleOption.builder() .node("tnt-countdown", "color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 255, 0)) .notifyClient() .build(); @@ -105,6 +112,7 @@ public final class ModTntCountdown { */ public static final SimpleOption PREFIX_COLOR = SimpleOption.builder() .node("tnt-countdown", "prefix-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModToggleSneak.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModToggleSneak.java index e5049ae13..fd4c834e4 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModToggleSneak.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModToggleSneak.java @@ -41,6 +41,7 @@ public final class ModToggleSneak { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("toggle-sneak", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModToggleSneak { */ public static final SimpleOption TOGGLE_SPRINT = SimpleOption.builder() .node("toggle-sneak", "toggle-sprint").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModToggleSneak { */ public static final SimpleOption SPRINT_KEYBIND_OVERRIDE = SimpleOption.builder() .node("toggle-sneak", "sprint-keybind-override").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModToggleSneak { */ public static final SimpleOption TOGGLE_SNEAK = SimpleOption.builder() .node("toggle-sneak", "toggle-sneak").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -81,6 +85,7 @@ public final class ModToggleSneak { */ public static final SimpleOption SNEAK_KEYBIND_OVERRIDE = SimpleOption.builder() .node("toggle-sneak", "sneak-keybind-override").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -91,6 +96,7 @@ public final class ModToggleSneak { */ public static final SimpleOption TOGGLE_SNEAK_CONTAINER = SimpleOption.builder() .node("toggle-sneak", "toggle-sneak-container").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -101,6 +107,7 @@ public final class ModToggleSneak { */ public static final SimpleOption DOUBLE_TAP = SimpleOption.builder() .node("toggle-sneak", "double-tap").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -111,6 +118,7 @@ public final class ModToggleSneak { */ public static final SimpleOption FLY_BOOST = SimpleOption.builder() .node("toggle-sneak", "fly-boost").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -122,6 +130,7 @@ public final class ModToggleSneak { public static final NumberOption FLY_BOOST_AMOUNT = NumberOption.number() .node("toggle-sneak", "fly-boost-amount").type(TypeToken.get(Integer.class)) .min(2).max(8) + .defaultValue(4) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTotemCounter.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTotemCounter.java index 979d79474..e8262b395 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTotemCounter.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModTotemCounter.java @@ -41,6 +41,7 @@ public final class ModTotemCounter { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("totem-counter", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModTotemCounter { */ public static final SimpleOption SHOW_FOR_SELF = SimpleOption.builder() .node("totem-counter", "show-for-self").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModTotemCounter { */ public static final SimpleOption SHOW_TAB_LIST = SimpleOption.builder() .node("totem-counter", "show-tab-list").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModTotemCounter { */ public static final SimpleOption FLIP = SimpleOption.builder() .node("totem-counter", "flip").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -81,6 +85,7 @@ public final class ModTotemCounter { */ public static final SimpleOption COUNT_COLOR = SimpleOption.builder() .node("totem-counter", "count-color").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -91,6 +96,7 @@ public final class ModTotemCounter { */ public static final SimpleOption SHOW_NAMETAG = SimpleOption.builder() .node("totem-counter", "show-nametag").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -101,6 +107,7 @@ public final class ModTotemCounter { */ public static final SimpleOption SHOW_PREFIX = SimpleOption.builder() .node("totem-counter", "show-prefix").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -111,6 +118,7 @@ public final class ModTotemCounter { */ public static final SimpleOption SEPARATE_NAMETAG = SimpleOption.builder() .node("totem-counter", "separate-nametag").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -121,6 +129,7 @@ public final class ModTotemCounter { */ public static final SimpleOption RENDER_FIRST = SimpleOption.builder() .node("totem-counter", "render-first").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -131,6 +140,7 @@ public final class ModTotemCounter { */ public static final SimpleOption PREFIX_COLOR = SimpleOption.builder() .node("totem-counter", "prefix-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 85)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModUhcOverlay.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModUhcOverlay.java index d9a99a7d6..77986f260 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModUhcOverlay.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModUhcOverlay.java @@ -41,6 +41,7 @@ public final class ModUhcOverlay { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("uhc-overlay", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaila.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaila.java index 8a5918c5e..0738a2984 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaila.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaila.java @@ -42,6 +42,7 @@ public final class ModWaila { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("waila", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -52,7 +53,8 @@ public final class ModWaila { */ public static final NumberOption SCALE = NumberOption.number() .node("waila", "scale").type(TypeToken.get(Float.class)) - .min(0.5F).max(1.5F) + .min(0.25F).max(5.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModWaila { */ public static final SimpleOption ALWAYS_SHOW = SimpleOption.builder() .node("waila", "always-show").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -73,6 +76,7 @@ public final class ModWaila { */ public static final SimpleOption SHOW_ENTITIES = SimpleOption.builder() .node("waila", "show-entities").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,16 +87,19 @@ public final class ModWaila { */ public static final SimpleOption SHOW_COSMETICS = SimpleOption.builder() .node("waila", "show-cosmetics").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("waila", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -103,6 +110,7 @@ public final class ModWaila { */ public static final SimpleOption BACKGROUND = SimpleOption.builder() .node("waila", "background").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -113,6 +121,7 @@ public final class ModWaila { */ public static final SimpleOption BORDER = SimpleOption.builder() .node("waila", "border").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -124,6 +133,7 @@ public final class ModWaila { public static final NumberOption BORDER_THICKNESS = NumberOption.number() .node("waila", "border-thickness").type(TypeToken.get(Float.class)) .min(0.5F).max(3.0F) + .defaultValue(0.5F) .notifyClient() .build(); @@ -134,6 +144,7 @@ public final class ModWaila { */ public static final SimpleOption SHOW_BLOCK_COORDS = SimpleOption.builder() .node("waila", "show-block-coords").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -144,6 +155,7 @@ public final class ModWaila { */ public static final SimpleOption BLOCK_COORDS_COLOR = SimpleOption.builder() .node("waila", "block-coords-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -154,6 +166,7 @@ public final class ModWaila { */ public static final SimpleOption SHOW_CORRECT_TOOL = SimpleOption.builder() .node("waila", "show-correct-tool").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -164,6 +177,7 @@ public final class ModWaila { */ public static final SimpleOption CORRECT_TOOL_COLOR = SimpleOption.builder() .node("waila", "correct-tool-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -174,6 +188,7 @@ public final class ModWaila { */ public static final SimpleOption SHOW_BREAK_TIME = SimpleOption.builder() .node("waila", "show-break-time").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -184,6 +199,7 @@ public final class ModWaila { */ public static final SimpleOption BREAK_TIME_COLOR = SimpleOption.builder() .node("waila", "break-time-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -194,6 +210,7 @@ public final class ModWaila { */ public static final SimpleOption SHOW_LIGHT_LEVEL = SimpleOption.builder() .node("waila", "show-light-level").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -204,6 +221,7 @@ public final class ModWaila { */ public static final SimpleOption LIGHT_LEVEL_COLOR = SimpleOption.builder() .node("waila", "light-level-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -214,6 +232,7 @@ public final class ModWaila { */ public static final SimpleOption TEXT_COLOR = SimpleOption.builder() .node("waila", "text-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); @@ -224,6 +243,7 @@ public final class ModWaila { */ public static final SimpleOption BACKGROUND_COLOR = SimpleOption.builder() .node("waila", "background-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 128)) .notifyClient() .build(); @@ -234,6 +254,7 @@ public final class ModWaila { */ public static final SimpleOption BORDER_COLOR = SimpleOption.builder() .node("waila", "border-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 0, 159)) .notifyClient() .build(); @@ -245,6 +266,7 @@ public final class ModWaila { public static final NumberOption VERTICAL_SPACING = NumberOption.number() .node("waila", "vertical-spacing").type(TypeToken.get(Integer.class)) .min(1).max(10) + .defaultValue(3) .notifyClient() .build(); @@ -256,6 +278,7 @@ public final class ModWaila { public static final NumberOption HORIZONTAL_SPACING = NumberOption.number() .node("waila", "horizontal-spacing").type(TypeToken.get(Integer.class)) .min(1).max(10) + .defaultValue(3) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaypoints.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaypoints.java index 4ce9cfe7b..bc63e19ba 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaypoints.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWaypoints.java @@ -41,36 +41,43 @@ public final class ModWaypoints { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("waypoints", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Allows you to click coordinates in chat and create a new waypoint from them. * * @since 1.1.6 */ public static final SimpleOption ADD_WAYPOINTS_FROM_CHAT = SimpleOption.builder() + .comment("Allows you to click coordinates in chat and create a new waypoint from them") .node("waypoints", "add-waypoints-from-chat").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Automatically create a waypoint when you die. * * @since 1.0.0 */ public static final SimpleOption DEATH_WAYPOINT = SimpleOption.builder() + .comment("Automatically create a waypoint when you die") .node("waypoints", "death-waypoint").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Limit the amount of waypoints that can be created, removing the oldest one when going over the limit. * * @since 1.1.9 */ public static final SimpleOption LIMIT_DEATH_WAYPOINTS = SimpleOption.builder() + .comment("Limit the amount of waypoints that can be created, removing the oldest one when going over the limit") .node("waypoints", "limit-death-waypoints").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -83,47 +90,56 @@ public final class ModWaypoints { .comment("Maximum amount of Death Waypoints you will see at one time") .node("waypoints", "max-death-waypoints").type(TypeToken.get(Integer.class)) .min(1).max(20) + .defaultValue(3) .notifyClient() .build(); /** - * No documentation available. + * Enables beams for waypoints in the world. * * @since 1.0.0 */ public static final SimpleOption WAYPOINT_BEAMS = SimpleOption.builder() + .comment("Enables beams for waypoints in the world") .node("waypoints", "waypoint-beams").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a box around the waypoint label in the world. * * @since 1.0.0 */ public static final SimpleOption BOX_BORDER = SimpleOption.builder() + .comment("Adds a box around the waypoint label in the world") .node("waypoints", "box-border").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * No documentation available. + * Adds a shadow to text. * * @since 1.0.0 */ public static final SimpleOption TEXT_SHADOW = SimpleOption.builder() + .comment("Adds a shadow to text") .node("waypoints", "text-shadow").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Increase the size of the labels box. * * @since 1.0.0 */ public static final NumberOption BOX_PADDING = NumberOption.number() + .comment("Increase the size of the labels box") .node("waypoints", "box-padding").type(TypeToken.get(Float.class)) .min(1.0F).max(8.0F) + .defaultValue(4.0F) .notifyClient() .build(); @@ -135,39 +151,82 @@ public final class ModWaypoints { public static final SimpleOption SHOW_ICONS = SimpleOption.builder() .comment("Show simpler text icons above each waypoint") .node("waypoints", "show-icons").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); /** - * No documentation available. + * Scale the box containing the waypoints name in the world. * * @since 1.0.0 */ public static final NumberOption LABEL_SCALE = NumberOption.number() + .comment("Scale the box containing the waypoints name in the world") .node("waypoints", "label-scale").type(TypeToken.get(Float.class)) .min(0.1F).max(2.0F) + .defaultValue(1.0F) .notifyClient() .build(); /** - * No documentation available. + * Scale the box containing the waypoints icon in the world. * * @since 1.0.0 */ public static final NumberOption ICON_SCALE = NumberOption.number() + .comment("Scale the box containing the waypoints icon in the world") .node("waypoints", "icon-scale").type(TypeToken.get(Float.class)) .min(0.1F).max(3.0F) + .defaultValue(1.5F) + .notifyClient() + .build(); + + /** + * Show an outline around the block the waypoint is positioned on. + * + * @since 1.2.1 + */ + public static final SimpleOption HIGHLIGHT_WAYPOINT_BLOCK = SimpleOption.builder() + .comment("Show an outline around the block the waypoint is positioned on") + .node("waypoints", "highlight-waypoint-block").type(TypeToken.get(Boolean.class)) + .defaultValue(true) + .notifyClient() + .build(); + + /** + * The width of the outline around the block being highlighted. + * + * @since 1.2.1 + */ + public static final NumberOption HIGHLIGHT_WAYPOINT_BLOCK_LINE_WIDTH = NumberOption.number() + .comment("The width of the outline around the block being highlighted") + .node("waypoints", "highlight-waypoint-block-line-width").type(TypeToken.get(Float.class)) + .min(1.5F).max(7.5F) + .defaultValue(4.0F) + .notifyClient() + .build(); + + /** + * Show the distance of a waypoint in the world. + * + * @since 1.2.1 + */ + public static final SimpleOption WAYPOINT_SHOW_DISTANCE = SimpleOption.builder() + .comment("Show the distance of a waypoint in the world") + .node("waypoints", "waypoint-show-distance").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); /** - * Only show each waypoint when looking near then in the world. + * Waypoints will only be displayed when your camera is facing towards their general direction. * * @since 1.0.0 */ public static final SimpleOption ONLY_SHOW_WHEN_LOOKING_NEAR = SimpleOption.builder() - .comment("Only show each waypoint when looking near then in the world") + .comment("Waypoints will only be displayed when your camera is facing towards their general direction") .node("waypoints", "only-show-when-looking-near").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWeatherChanger.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWeatherChanger.java index a1b7bc15e..1e9ef7070 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWeatherChanger.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWeatherChanger.java @@ -42,6 +42,7 @@ public final class ModWeatherChanger { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("weather-changer", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -53,6 +54,7 @@ public final class ModWeatherChanger { public static final NumberOption RAIN_STRENGTH = NumberOption.number() .node("weather-changer", "rain-strength").type(TypeToken.get(Float.class)) .min(0.0F).max(1.0F) + .defaultValue(1.0F) .notifyClient() .build(); @@ -64,6 +66,7 @@ public final class ModWeatherChanger { public static final SimpleOption RAIN_COLOR = SimpleOption.builder() .comment("Augment the rain/snow color") .node("weather-changer", "rain-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 255, 255)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWorldeditCui.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWorldeditCui.java index bdb501ecb..943ba4c4d 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWorldeditCui.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModWorldeditCui.java @@ -41,6 +41,7 @@ public final class ModWorldeditCui { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("worldedit-cui", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -51,6 +52,7 @@ public final class ModWorldeditCui { */ public static final SimpleOption POSITION_ONE_COLOR = SimpleOption.builder() .node("worldedit-cui", "position-one-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 0, 255)) .notifyClient() .build(); @@ -61,6 +63,7 @@ public final class ModWorldeditCui { */ public static final SimpleOption POSITION_TWO_COLOR = SimpleOption.builder() .node("worldedit-cui", "position-two-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(255, 0, 0)) .notifyClient() .build(); @@ -71,6 +74,7 @@ public final class ModWorldeditCui { */ public static final SimpleOption OUTLINE_COLOR = SimpleOption.builder() .node("worldedit-cui", "outline-color").type(TypeToken.get(Color.class)) + .defaultValue(new Color(0, 255, 0)) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModZoom.java b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModZoom.java index f4df769cc..d7329103a 100644 --- a/api/src/main/java/com/lunarclient/apollo/mods/impl/ModZoom.java +++ b/api/src/main/java/com/lunarclient/apollo/mods/impl/ModZoom.java @@ -41,6 +41,7 @@ public final class ModZoom { */ public static final SimpleOption ENABLED = SimpleOption.builder() .node("zoom", "enabled").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -52,6 +53,7 @@ public final class ModZoom { public static final SimpleOption TOGGLE_KEY_ZOOM = SimpleOption.builder() .comment("Quickly pressing and releasing the key will toggle zoom") .node("zoom", "toggle-key-zoom").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -63,6 +65,7 @@ public final class ModZoom { public static final SimpleOption SMOOTH_CAMERA = SimpleOption.builder() .comment("When zoomed in the camera movement will move smoothly (cinematic camera)") .node("zoom", "smooth-camera").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -74,6 +77,7 @@ public final class ModZoom { public static final SimpleOption SMOOTH_ZOOM = SimpleOption.builder() .comment("Add a transition when zooming in and out.") .node("zoom", "smooth-zoom").type(TypeToken.get(Boolean.class)) + .defaultValue(true) .notifyClient() .build(); @@ -85,6 +89,7 @@ public final class ModZoom { public static final SimpleOption VARIABLE_ZOOM = SimpleOption.builder() .comment("Adjust the zoom depth using Mouse Scroll Wheel") .node("zoom", "variable-zoom").type(TypeToken.get(Boolean.class)) + .defaultValue(false) .notifyClient() .build(); @@ -97,6 +102,7 @@ public final class ModZoom { .comment("Change the initial zoom depth.") .node("zoom", "zoom-divisor").type(TypeToken.get(Integer.class)) .min(2).max(10) + .defaultValue(4) .notifyClient() .build(); @@ -109,6 +115,7 @@ public final class ModZoom { .comment("Change the camera sensitivity when zoomed in.") .node("zoom", "camera-sensitivity").type(TypeToken.get(Float.class)) .min(0.1F).max(2.0F) + .defaultValue(1.0F) .notifyClient() .build(); diff --git a/api/src/main/java/com/lunarclient/apollo/module/ApolloModule.java b/api/src/main/java/com/lunarclient/apollo/module/ApolloModule.java index 2e1fce1b0..ae1a03d4e 100644 --- a/api/src/main/java/com/lunarclient/apollo/module/ApolloModule.java +++ b/api/src/main/java/com/lunarclient/apollo/module/ApolloModule.java @@ -120,7 +120,17 @@ protected ApolloModule() { * @since 1.0.0 */ protected void registerOptions(Option... options) { - this.optionKeys.addAll(Arrays.asList(options)); + this.registerOptions(Arrays.asList(options)); + } + + /** + * Registers {@link Option}s for this module. + * + * @param options the option keys + * @since 1.2.1 + */ + protected void registerOptions(Collection> options) { + this.optionKeys.addAll(options); } /** diff --git a/api/src/main/java/com/lunarclient/apollo/module/modsetting/ModSettingModule.java b/api/src/main/java/com/lunarclient/apollo/module/modsetting/ModSettingModule.java index 219f30161..c51a89520 100644 --- a/api/src/main/java/com/lunarclient/apollo/module/modsetting/ModSettingModule.java +++ b/api/src/main/java/com/lunarclient/apollo/module/modsetting/ModSettingModule.java @@ -24,26 +24,25 @@ package com.lunarclient.apollo.module.modsetting; import com.lunarclient.apollo.ApolloPlatform; -import com.lunarclient.apollo.mods.Mods; import com.lunarclient.apollo.module.ApolloModule; import com.lunarclient.apollo.module.ModuleDefinition; import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.player.ApolloPlayer; import com.lunarclient.apollo.util.ConfigTarget; -import java.lang.reflect.Field; import java.util.Arrays; import java.util.Collection; +import lombok.NonNull; +import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; /** * Represents the mod settings module. * * @since 1.0.0 */ +@ApiStatus.NonExtendable @ModuleDefinition(id = "mod_setting", name = "Mod Setting", configTarget = ConfigTarget.MOD_SETTINGS) -public final class ModSettingModule extends ApolloModule { - - ModSettingModule() { - this.registerModOptions(); - } +public abstract class ModSettingModule extends ApolloModule { @Override public Collection getSupportedPlatforms() { @@ -55,20 +54,16 @@ public boolean isClientNotify() { return true; } - private void registerModOptions() { - for (Class mod : Mods.ALL_MODS) { - Field[] fields = mod.getDeclaredFields(); - - for (Field field : fields) { - try { - field.setAccessible(true); - Option option = (Option) field.get(Option.class); - this.registerOptions(option); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } - } - } + /** + * Gets the value of the specified {@link Option} for the {@link ApolloPlayer}. + * + * @param player the apollo player + * @param option the option + * @param the value type + * @param the option type + * @return the value of the option + * @since 1.2.1 + */ + public abstract > T getStatus(@NotNull ApolloPlayer player, @NonNull C option); } diff --git a/api/src/main/java/com/lunarclient/apollo/module/paynow/PayNowEmbeddedCheckoutSupport.java b/api/src/main/java/com/lunarclient/apollo/module/paynow/PayNowEmbeddedCheckoutSupport.java new file mode 100644 index 000000000..4a9be059f --- /dev/null +++ b/api/src/main/java/com/lunarclient/apollo/module/paynow/PayNowEmbeddedCheckoutSupport.java @@ -0,0 +1,54 @@ +/* + * 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.module.paynow; + +/** + * Represents the paynow embedded checkout support type. + * + * @since 1.2.1 + */ +public enum PayNowEmbeddedCheckoutSupport { + + /** + * External checkout is supported as a game overlay. + * + * @since 1.2.1 + */ + OVERLAY, + + /** + * Embedded checkout is supported in an external window. + * + * @since 1.2.1 + */ + WINDOW, + + /** + * The checkout is not supported. + * + * @since 1.2.1 + */ + UNSUPPORTED + +} diff --git a/api/src/main/java/com/lunarclient/apollo/module/paynow/PayNowModule.java b/api/src/main/java/com/lunarclient/apollo/module/paynow/PayNowModule.java new file mode 100644 index 000000000..79fcc41cc --- /dev/null +++ b/api/src/main/java/com/lunarclient/apollo/module/paynow/PayNowModule.java @@ -0,0 +1,49 @@ +/* + * 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.module.paynow; + +import com.lunarclient.apollo.module.ApolloModule; +import com.lunarclient.apollo.module.ModuleDefinition; +import com.lunarclient.apollo.recipients.Recipients; +import org.jetbrains.annotations.ApiStatus; + +/** + * Represents the pay now module. + * + * @since 1.2.1 + */ +@ApiStatus.NonExtendable +@ModuleDefinition(id = "pay_now", name = "PayNow") +public abstract class PayNowModule extends ApolloModule { + + /** + * Displays the checkout with the provided {@link String} checkout token to the {@link Recipients}. + * + * @param recipients the recipients that are receiving the packet + * @param checkoutToken the paynow checkout token + * @since 1.2.1 + */ + public abstract void displayPayNowEmbeddedCheckout(Recipients recipients, String checkoutToken); + +} diff --git a/api/src/main/java/com/lunarclient/apollo/module/tebex/TebexEmbeddedCheckoutSupport.java b/api/src/main/java/com/lunarclient/apollo/module/tebex/TebexEmbeddedCheckoutSupport.java index 7b8ab72e6..4f0685777 100644 --- a/api/src/main/java/com/lunarclient/apollo/module/tebex/TebexEmbeddedCheckoutSupport.java +++ b/api/src/main/java/com/lunarclient/apollo/module/tebex/TebexEmbeddedCheckoutSupport.java @@ -24,7 +24,7 @@ package com.lunarclient.apollo.module.tebex; /** - * Represents an embedded checkout support type. + * Represents the tebex embedded checkout support type. * * @since 1.1.6 */ diff --git a/api/src/main/java/com/lunarclient/apollo/option/EmptyOptions.java b/api/src/main/java/com/lunarclient/apollo/option/EmptyOptions.java index 835f29b64..62bbe5dc3 100644 --- a/api/src/main/java/com/lunarclient/apollo/option/EmptyOptions.java +++ b/api/src/main/java/com/lunarclient/apollo/option/EmptyOptions.java @@ -26,6 +26,7 @@ import com.lunarclient.apollo.player.ApolloPlayer; import java.util.Collections; import java.util.Iterator; +import java.util.Map; import java.util.Optional; import java.util.function.BiFunction; import lombok.AccessLevel; @@ -97,6 +98,16 @@ public void replace(ApolloPlayer player, Option option, BiFunction< } + @Override + public > void register(C option) { + + } + + @Override + public Map> getRegistry() { + return Collections.emptyMap(); + } + @Override public @NonNull Iterator> iterator() { return Collections.emptyIterator(); diff --git a/api/src/main/java/com/lunarclient/apollo/option/Option.java b/api/src/main/java/com/lunarclient/apollo/option/Option.java index 0c94b2323..3a0115160 100644 --- a/api/src/main/java/com/lunarclient/apollo/option/Option.java +++ b/api/src/main/java/com/lunarclient/apollo/option/Option.java @@ -43,7 +43,7 @@ @Getter @EqualsAndHashCode @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) -public abstract class Option, I extends Option> { +public abstract class Option, I extends Option> implements Cloneable { /** * Returns a new {@link SimpleOption.SimpleOptionBuilder}. @@ -78,6 +78,17 @@ public static ListOption.ListOptionBuilder list() { return new ListOption.ListOptionBuilder<>(); } + /** + * Returns a new {@link EnumOption.EnumOptionBuilder}. + * + * @param the value type + * @return a new enum option builder + * @since 1.2.1 + */ + public static > EnumOption.EnumOptionBuilder enumerator() { + return new EnumOption.EnumOptionBuilder<>(); + } + /** * Returns the option path. * @@ -138,4 +149,14 @@ public String getKey() { return String.join(".", this.getPath()); } + @Override + @SuppressWarnings("unchecked") + public Option clone() { + try { + return (Option) super.clone(); + } catch (CloneNotSupportedException e) { + throw new AssertionError(e); + } + } + } diff --git a/api/src/main/java/com/lunarclient/apollo/option/Options.java b/api/src/main/java/com/lunarclient/apollo/option/Options.java index 7c6ade313..7c13447b1 100644 --- a/api/src/main/java/com/lunarclient/apollo/option/Options.java +++ b/api/src/main/java/com/lunarclient/apollo/option/Options.java @@ -24,6 +24,7 @@ package com.lunarclient.apollo.option; import com.lunarclient.apollo.player.ApolloPlayer; +import java.util.Map; import java.util.Optional; import java.util.function.BiFunction; import org.jetbrains.annotations.Nullable; @@ -188,4 +189,22 @@ static Options empty() { */ void replace(ApolloPlayer player, Option option, BiFunction, T, T> remappingFunction); + /** + * Registers the provided {@code C} option for the {@link Options} implementation. + * + * @param option the option + * @param the value type + * @param the option type + * @since 1.2.1 + */ + > void register(C option); + + /** + * Returns the internal registry containing all registered {@link Option} instances, mapped by their keys. + * + * @return the map of option keys to their corresponding {@link Option} instances + * @since 1.2.1 + */ + Map> getRegistry(); + } diff --git a/api/src/main/java/com/lunarclient/apollo/player/ApolloPlayer.java b/api/src/main/java/com/lunarclient/apollo/player/ApolloPlayer.java index 3ed20bd5e..b64ff4481 100644 --- a/api/src/main/java/com/lunarclient/apollo/player/ApolloPlayer.java +++ b/api/src/main/java/com/lunarclient/apollo/player/ApolloPlayer.java @@ -27,6 +27,7 @@ import com.lunarclient.apollo.client.version.LunarClientVersion; import com.lunarclient.apollo.client.version.MinecraftVersion; import com.lunarclient.apollo.common.location.ApolloLocation; +import com.lunarclient.apollo.module.paynow.PayNowEmbeddedCheckoutSupport; import com.lunarclient.apollo.module.tebex.TebexEmbeddedCheckoutSupport; import com.lunarclient.apollo.option.Option; import com.lunarclient.apollo.option.Options; @@ -144,4 +145,12 @@ default boolean hasPermission(Options options, Option option) { */ @Nullable TebexEmbeddedCheckoutSupport getTebexEmbeddedCheckoutSupport(); + /** + * Returns the {@link PayNowEmbeddedCheckoutSupport} type. + * + * @return the Pay Now checkout support type + * @since 1.2.1 + */ + @Nullable PayNowEmbeddedCheckoutSupport getPayNowEmbeddedCheckoutSupport(); + } diff --git a/common/src/main/java/com/lunarclient/apollo/ApolloManager.java b/common/src/main/java/com/lunarclient/apollo/ApolloManager.java index 8c967e2b7..0490073fe 100644 --- a/common/src/main/java/com/lunarclient/apollo/ApolloManager.java +++ b/common/src/main/java/com/lunarclient/apollo/ApolloManager.java @@ -26,10 +26,12 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.lunarclient.apollo.api.ApolloHttpManager; +import com.lunarclient.apollo.mods.ApolloModsManager; import com.lunarclient.apollo.module.ApolloModuleManagerImpl; import com.lunarclient.apollo.network.ApolloNetworkManager; import com.lunarclient.apollo.option.ConfigOptions; import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.option.Options; import com.lunarclient.apollo.option.config.CommonSerializers; import com.lunarclient.apollo.player.ApolloPlayerManagerImpl; import com.lunarclient.apollo.roundtrip.ApolloRoundtripManager; @@ -39,9 +41,7 @@ import com.lunarclient.apollo.version.ApolloVersionManager; import com.lunarclient.apollo.world.ApolloWorldManagerImpl; import java.nio.file.Path; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; +import java.util.Collection; import lombok.Getter; import lombok.Setter; @@ -67,8 +67,6 @@ public final class ApolloManager { */ public static final Gson GSON = new GsonBuilder().create(); - private static final List> optionKeys = new LinkedList<>(); - private static ApolloPlatform platform; @Getter private static ApolloRoundtripManager roundtripManager; @@ -76,6 +74,7 @@ public final class ApolloManager { @Getter private static ApolloNetworkManager networkManager; @Getter private static ApolloVersionManager versionManager; @Getter private static ApolloStatsManager statsManager; + @Getter private static ApolloModsManager modsManager; @Getter @Setter private static ApolloMetadataManager metadataManager; @Getter private static Path configPath; @@ -106,6 +105,7 @@ public static void bootstrap(ApolloPlatform platform) { ApolloManager.networkManager = new ApolloNetworkManager(); ApolloManager.versionManager = new ApolloVersionManager(); ApolloManager.statsManager = new ApolloStatsManager(); + ApolloManager.modsManager = new ApolloModsManager(); new CommonSerializers(); @@ -124,7 +124,10 @@ public static void bootstrap(ApolloPlatform platform) { * @since 1.0.0 */ public static void registerOptions(Option... options) { - ApolloManager.optionKeys.addAll(Arrays.asList(options)); + Options platformOptions = Apollo.getPlatform().getOptions(); + for (Option option : options) { + platformOptions.register(option); + } } /** @@ -147,8 +150,9 @@ public static void loadConfiguration() throws Throwable { config.reset(); } + Collection> platformOptions = Apollo.getPlatform().getOptions().getRegistry().values(); ApolloConfig generalSettings = ApolloConfig.compute(ApolloManager.configPath, ConfigTarget.GENERAL_SETTINGS); - ConfigOptions.loadOptions(ApolloManager.platform.getOptions(), generalSettings.node(), ApolloManager.optionKeys); + ConfigOptions.loadOptions(ApolloManager.platform.getOptions(), generalSettings.node(), platformOptions); } /** @@ -157,8 +161,9 @@ public static void loadConfiguration() throws Throwable { * @since 1.0.0 */ public static void saveConfiguration() throws Throwable { + Collection> platformOptions = Apollo.getPlatform().getOptions().getRegistry().values(); ApolloConfig generalSettings = ApolloConfig.compute(ApolloManager.configPath, ConfigTarget.GENERAL_SETTINGS); - ConfigOptions.saveOptions(ApolloManager.platform.getOptions(), generalSettings.node(), ApolloManager.optionKeys); + ConfigOptions.saveOptions(ApolloManager.platform.getOptions(), generalSettings.node(), platformOptions); ((ApolloModuleManagerImpl) Apollo.getModuleManager()).saveConfiguration(); diff --git a/common/src/main/java/com/lunarclient/apollo/mods/ApolloModsManager.java b/common/src/main/java/com/lunarclient/apollo/mods/ApolloModsManager.java new file mode 100644 index 000000000..4925df21a --- /dev/null +++ b/common/src/main/java/com/lunarclient/apollo/mods/ApolloModsManager.java @@ -0,0 +1,123 @@ +/* + * 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.mods; + +import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.option.StatusOptionsImpl; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * Manages Apollo mods for players. + * + * @since 1.2.1 + */ +@Getter +public final class ApolloModsManager { + + private final Container container; + private final StatusOptionsImpl playerOptions; + + /** + * Constructs the {@link ApolloModsManager}. + * + * @since 1.2.1 + */ + public ApolloModsManager() { + this.container = ApolloModsManager.loadModOptions(); + this.playerOptions = new StatusOptionsImpl(this.container.getModStatusOptions().values()); + } + + /** + * Load all options from auto-generated mod classes into a {@link Container} object. + * + * @return the container + * @since 1.2.1 + */ + public static Container loadModOptions() { + Map> modStatusOptions = new LinkedHashMap<>(); + List> modSettingsOptions = new ArrayList<>(); + + try { + Field defaultValueField = Option.class.getDeclaredField("defaultValue"); + defaultValueField.setAccessible(true); + + for (Class mod : Mods.ALL_MODS) { + Field[] fields = mod.getDeclaredFields(); + + for (Field field : fields) { + field.setAccessible(true); + Option option = (Option) field.get(null); + + if (option == null) { + continue; + } + + modStatusOptions.put(option.getKey(), option); + + Option copy = option.clone(); + defaultValueField.set(copy, null); + modSettingsOptions.add(copy); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + return new Container(modStatusOptions, modSettingsOptions); + } + + /** + * Holds the loaded options. + * + * @since 1.2.1 + */ + @Getter + @RequiredArgsConstructor + public static class Container { + + /** + * Returns all registered mod options with default values. + * + * @return the map of option key to option + * @since 1.2.1 + */ + private final Map> modStatusOptions; + + /** + * Returns all registered mod options with default values removed. + * + * @return the list of options without default values + * @since 1.2.1 + */ + private final List> modSettingsOptions; + + } + +} diff --git a/common/src/main/java/com/lunarclient/apollo/module/ApolloModuleManagerImpl.java b/common/src/main/java/com/lunarclient/apollo/module/ApolloModuleManagerImpl.java index 3ee2c55b1..f744e82a2 100644 --- a/common/src/main/java/com/lunarclient/apollo/module/ApolloModuleManagerImpl.java +++ b/common/src/main/java/com/lunarclient/apollo/module/ApolloModuleManagerImpl.java @@ -77,9 +77,9 @@ public Collection getModules() { public void enableModules() throws Throwable { for (ApolloModule module : this.modules.values()) { // Load configuration options for the module. - module.setOptions(new OptionsImpl(module)); - List> options = module.getOptionKeys(); + module.setOptions(new OptionsImpl(module, options)); + this.loadConfiguration(module, options); // Enable the module if it is able to. diff --git a/common/src/main/java/com/lunarclient/apollo/module/modsettings/ModSettingModuleImpl.java b/common/src/main/java/com/lunarclient/apollo/module/modsettings/ModSettingModuleImpl.java new file mode 100644 index 000000000..b25ada636 --- /dev/null +++ b/common/src/main/java/com/lunarclient/apollo/module/modsettings/ModSettingModuleImpl.java @@ -0,0 +1,138 @@ +/* + * 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.module.modsettings; + +import com.google.protobuf.Any; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.Value; +import com.lunarclient.apollo.ApolloManager; +import com.lunarclient.apollo.configurable.v1.ConfigurableSettings; +import com.lunarclient.apollo.configurable.v1.OverrideConfigurableSettingsMessage; +import com.lunarclient.apollo.event.ApolloReceivePacketEvent; +import com.lunarclient.apollo.event.EventBus; +import com.lunarclient.apollo.event.modsetting.ApolloUpdateModOptionEvent; +import com.lunarclient.apollo.module.modsetting.ModSettingModule; +import com.lunarclient.apollo.network.NetworkOptions; +import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.option.StatusOptionsImpl; +import com.lunarclient.apollo.player.ApolloPlayer; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import lombok.NonNull; +import org.jetbrains.annotations.NotNull; + +/** + * Provides the mod settings module. + * + * @since 1.2.1 + */ +public final class ModSettingModuleImpl extends ModSettingModule { + + /** + * Creates a new instance of {@link ModSettingModuleImpl}. + * + * @since 1.2.1 + */ + public ModSettingModuleImpl() { + super(); + this.registerOptions(ApolloManager.getModsManager().getContainer().getModSettingsOptions()); + this.handle(ApolloReceivePacketEvent.class, this::onReceivePacket); + } + + @Override + public > T getStatus(@NotNull ApolloPlayer player, @NonNull C option) { + return ApolloManager.getModsManager().getPlayerOptions().get(player, option); + } + + private void onReceivePacket(ApolloReceivePacketEvent event) { + ApolloPlayer player = event.getPlayer(); + Any packet = event.getPacket(); + + if(packet.is(OverrideConfigurableSettingsMessage.class) || packet.is(ConfigurableSettings.class)) { + this.handleConfiguration(player, packet); + } + } + + private void handleConfiguration(ApolloPlayer player, Any any) { + // Unpack the settings first. + List settings; + try { + if (any.is(OverrideConfigurableSettingsMessage.class)) { + OverrideConfigurableSettingsMessage message = any.unpack(OverrideConfigurableSettingsMessage.class); + settings = message.getConfigurableSettingsList(); + } else { + settings = Collections.singletonList(any.unpack(ConfigurableSettings.class)); + } + } catch (InvalidProtocolBufferException exception) { + throw new RuntimeException(exception); + } + + for (ConfigurableSettings setting : settings) { + if (!setting.hasApolloModule()) { + continue; + } + + if (!setting.getApolloModule().equals(this.getId())) { + continue; + } + + this.updateOptions(player, setting.getPropertiesMap(), true); + } + } + + /** + * Updates the {@link Option}s for a specific {@link ApolloPlayer} using the properties + * received from the client. + * + * @param player the apollo player + * @param properties a map of option keys and values + * @param callEvent whether to call the update mod option event + * @since 1.2.1 + */ + public void updateOptions(ApolloPlayer player, Map properties, boolean callEvent) { + StatusOptionsImpl statusOptions = ApolloManager.getModsManager().getPlayerOptions(); + + for (Map.Entry entry : properties.entrySet()) { + Option option = statusOptions.getRegistry().get(entry.getKey()); + + Object unwrappedValue = NetworkOptions.unwrapValue( + entry.getValue(), + option.getTypeToken().getType() + ); + + statusOptions.set(player, option, unwrappedValue); + + if (callEvent) { + EventBus.EventResult eventResult = EventBus.getBus() + .post(new ApolloUpdateModOptionEvent(player, option, unwrappedValue)); + + for (Throwable throwable : eventResult.getThrowing()) { + throwable.printStackTrace(); + } + } + } + } + +} diff --git a/common/src/main/java/com/lunarclient/apollo/module/paynow/PayNowModuleImpl.java b/common/src/main/java/com/lunarclient/apollo/module/paynow/PayNowModuleImpl.java new file mode 100644 index 000000000..4a181cbc3 --- /dev/null +++ b/common/src/main/java/com/lunarclient/apollo/module/paynow/PayNowModuleImpl.java @@ -0,0 +1,47 @@ +/* + * 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.module.paynow; + +import com.lunarclient.apollo.paynow.v1.OpenPayNowEmbeddedCheckoutMessage; +import com.lunarclient.apollo.player.AbstractApolloPlayer; +import com.lunarclient.apollo.recipients.Recipients; +import lombok.NonNull; + +/** + * Provides the paynow module. + * + * @since 1.2.1 + */ +public final class PayNowModuleImpl extends PayNowModule { + + @Override + public void displayPayNowEmbeddedCheckout(@NonNull Recipients recipients, @NonNull String checkoutToken) { + OpenPayNowEmbeddedCheckoutMessage message = OpenPayNowEmbeddedCheckoutMessage.newBuilder() + .setCheckoutToken(checkoutToken) + .build(); + + recipients.forEach(player -> ((AbstractApolloPlayer) player).sendPacket(message)); + } + +} diff --git a/common/src/main/java/com/lunarclient/apollo/network/NetworkOptions.java b/common/src/main/java/com/lunarclient/apollo/network/NetworkOptions.java index 331b4aecc..33f72d39e 100644 --- a/common/src/main/java/com/lunarclient/apollo/network/NetworkOptions.java +++ b/common/src/main/java/com/lunarclient/apollo/network/NetworkOptions.java @@ -23,6 +23,8 @@ */ package com.lunarclient.apollo.network; +import com.google.protobuf.ListValue; +import com.google.protobuf.NullValue; import com.google.protobuf.Value; import com.lunarclient.apollo.ApolloManager; import com.lunarclient.apollo.configurable.v1.ConfigurableSettings; @@ -30,9 +32,16 @@ import com.lunarclient.apollo.module.ApolloModule; import com.lunarclient.apollo.option.Option; import com.lunarclient.apollo.option.Options; -import com.lunarclient.apollo.option.OptionsImpl; import com.lunarclient.apollo.player.AbstractApolloPlayer; import com.lunarclient.apollo.player.ApolloPlayer; +import io.leangen.geantyref.GenericTypeReflector; +import java.awt.Color; +import java.lang.reflect.AnnotatedParameterizedType; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import org.jetbrains.annotations.Nullable; /** @@ -95,6 +104,99 @@ public static void sendOptions(Iterable modules, } } + /** + * Wraps the provided value into a protobuf {@link Value}. + * + * @param valueBuilder the value builder + * @param type the value type + * @param current the current value + * @return the wrapped value + * @since 1.0.0 + */ + public static Value wrapValue(Value.Builder valueBuilder, Type type, @Nullable Object current) { + if (current == null) { + return valueBuilder.setNullValue(NullValue.NULL_VALUE).build(); + } + + Type boxed = GenericTypeReflector.box(type); + Class clazz = GenericTypeReflector.erase(boxed); + + if (clazz.isEnum()) { + return valueBuilder.setStringValue(((Enum) current).name()).build(); + } else if (Number.class.isAssignableFrom(clazz)) { + return valueBuilder.setNumberValue(((Number) current).doubleValue()).build(); + } else if (String.class.isAssignableFrom(clazz)) { + return valueBuilder.setStringValue((String) current).build(); + } else if (Boolean.class.isAssignableFrom(clazz)) { + return valueBuilder.setBoolValue((Boolean) current).build(); + } else if (List.class.isAssignableFrom(clazz)) { + AnnotatedType elementType = NetworkOptions.elementType(boxed); + ListValue.Builder listBuilder = ListValue.newBuilder(); + for (Object object : (List) current) { + listBuilder.addValues(NetworkOptions.wrapValue(Value.newBuilder(), elementType.getType(), object)); + } + + return valueBuilder.setListValue(listBuilder.build()).build(); + } else if (Color.class.isAssignableFrom(clazz)) { + if (current instanceof String) { + String string = (String) current; + return valueBuilder.setStringValue(string).build(); + } else if (current instanceof Color) { + Color color = (Color) current; + return valueBuilder.setStringValue(Integer.toHexString(color.getRGB())).build(); + } else if (current instanceof Integer) { + int color = (int) current; + return valueBuilder.setStringValue(Integer.toHexString(color)).build(); + } else { + throw new RuntimeException("Unable to wrap Color value of type '" + clazz.getSimpleName() + "'!"); + + } + } + + throw new RuntimeException("Unable to wrap value of type '" + clazz.getSimpleName() + "'!"); + } + + /** + * Unwraps the provided protobuf {@link Value} into the appropriate object. + * + * @param wrapper the wrapped value + * @param type the wrapped type + * @return the unwrapped value + * @since 1.0.0 + */ + @SuppressWarnings({"unchecked", "rawtypes"}) + public static @Nullable Object unwrapValue(Value wrapper, Type type) { + if (wrapper.hasNullValue()) { + return null; + } + + Type boxed = GenericTypeReflector.box(type); + Class clazz = GenericTypeReflector.erase(boxed); + + if (clazz.isEnum() && wrapper.hasStringValue()) { + return Enum.valueOf((Class) clazz, wrapper.getStringValue()); + } else if (Number.class.isAssignableFrom(clazz) && wrapper.hasNumberValue()) { + return wrapper.getNumberValue(); + } else if (String.class.isAssignableFrom(clazz) && wrapper.hasStringValue()) { + return wrapper.getStringValue(); + } else if (Boolean.class.isAssignableFrom(clazz) && wrapper.hasBoolValue()) { + return wrapper.getBoolValue(); + } else if (List.class.isAssignableFrom(clazz) && wrapper.hasListValue()) { + AnnotatedType elementType = NetworkOptions.elementType(boxed); + ListValue listValue = wrapper.getListValue(); + List list = new ArrayList<>(listValue.getValuesCount()); + for (int i = 0; i < listValue.getValuesCount(); i++) { + list.add(NetworkOptions.unwrapValue(listValue.getValues(i), elementType.getType())); + } + + return Collections.unmodifiableList(list); + } else if (Color.class.isAssignableFrom(clazz) && wrapper.hasStringValue()) { + return wrapper.getStringValue(); + } + + throw new RuntimeException("Unable to unwrap value of type '" + clazz.getSimpleName() + "'!"); + } + private static ConfigurableSettings.Builder moduleWithOptions(ApolloModule module, boolean onlyPresent) { ConfigurableSettings.Builder builder = NetworkOptions.module(module); Options options = module.getOptions(); @@ -110,13 +212,22 @@ private static ConfigurableSettings.Builder moduleWithOptions(ApolloModule modul continue; } - Value wrapper = ((OptionsImpl) options).wrapValue(valueBuilder, option.getTypeToken().getType(), value); + Value wrapper = NetworkOptions.wrapValue(valueBuilder, option.getTypeToken().getType(), value); builder.putProperties(option.getKey(), wrapper); } return builder; } + private static AnnotatedType elementType(Type type) { + AnnotatedType elementType = GenericTypeReflector.annotate(type); + if(!(elementType instanceof AnnotatedParameterizedType)) { + throw new RuntimeException("Raw types for lists are not supported!"); + } + + return ((AnnotatedParameterizedType) elementType).getAnnotatedActualTypeArguments()[0]; + } + private static ConfigurableSettings.Builder module(@Nullable ApolloModule module) { return ConfigurableSettings.newBuilder() .setApolloModule(module == null ? ApolloManager.PLUGIN_ROOT_MODULE : module.getId()) diff --git a/common/src/main/java/com/lunarclient/apollo/option/ConfigOptions.java b/common/src/main/java/com/lunarclient/apollo/option/ConfigOptions.java index f1b47ae47..f61ba6751 100644 --- a/common/src/main/java/com/lunarclient/apollo/option/ConfigOptions.java +++ b/common/src/main/java/com/lunarclient/apollo/option/ConfigOptions.java @@ -24,7 +24,7 @@ package com.lunarclient.apollo.option; import io.leangen.geantyref.TypeToken; -import java.util.List; +import java.util.Collection; import org.spongepowered.configurate.CommentedConfigurationNode; /** @@ -43,7 +43,7 @@ public final class ConfigOptions { * @param optionKeys the option keys * @since 1.0.0 */ - public static void loadOptions(Options options, CommentedConfigurationNode node, List> optionKeys) { + public static void loadOptions(Options options, CommentedConfigurationNode node, Collection> optionKeys) { for (Option option : optionKeys) { CommentedConfigurationNode optionNode = node.node((Object[]) option.getPath()); if (optionNode.virtual()) { @@ -68,7 +68,7 @@ public static void loadOptions(Options options, CommentedConfigurationNode node, * @since 1.0.0 */ @SuppressWarnings("unchecked") - public static void saveOptions(Options options, CommentedConfigurationNode node, List> optionKeys) { + public static void saveOptions(Options options, CommentedConfigurationNode node, Collection> optionKeys) { for (Option option : optionKeys) { CommentedConfigurationNode optionNode = node.node((Object[]) option.getPath()); diff --git a/common/src/main/java/com/lunarclient/apollo/option/OptionsImpl.java b/common/src/main/java/com/lunarclient/apollo/option/OptionsImpl.java index 618671c53..36e94015d 100644 --- a/common/src/main/java/com/lunarclient/apollo/option/OptionsImpl.java +++ b/common/src/main/java/com/lunarclient/apollo/option/OptionsImpl.java @@ -23,8 +23,6 @@ */ package com.lunarclient.apollo.option; -import com.google.protobuf.ListValue; -import com.google.protobuf.NullValue; import com.google.protobuf.Value; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.event.EventBus; @@ -32,22 +30,16 @@ import com.lunarclient.apollo.module.ApolloModule; import com.lunarclient.apollo.network.NetworkOptions; import com.lunarclient.apollo.player.ApolloPlayer; -import io.leangen.geantyref.GenericTypeReflector; -import java.awt.Color; -import java.lang.reflect.AnnotatedParameterizedType; -import java.lang.reflect.AnnotatedType; -import java.lang.reflect.Type; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; -import java.util.WeakHashMap; +import java.util.UUID; import java.util.function.BiFunction; +import lombok.Getter; import lombok.NonNull; import org.jetbrains.annotations.Nullable; @@ -58,51 +50,66 @@ */ public class OptionsImpl implements Options { - private final Map, Object> options = Collections.synchronizedMap(new HashMap<>()); - private final Map, Object>> playerOptions = Collections.synchronizedMap(new WeakHashMap<>()); + @Getter + protected final Map> registry = new HashMap<>(); + + protected final Map options = Collections.synchronizedMap(new HashMap<>()); + + @Getter + protected final Map> playerOptions = Collections.synchronizedMap(new HashMap<>()); private final ApolloModule module; /** * Constructs a new {@link OptionsImpl}. * - * @param module the apollo module + * @param module the apollo module + * @param options the options for this container * @since 1.0.0 */ - public OptionsImpl(@Nullable ApolloModule module) { + public OptionsImpl(@Nullable ApolloModule module, Collection> options) { this.module = module; + + for (Option option : options) { + this.registry.put(option.getKey(), option); + } } @Override @SuppressWarnings("unchecked") public > T get(@NonNull C option) { - Object value = this.options.get(option); + option = (C) this.registry.get(option.getKey()); + Object value = this.options.get(option.getKey()); return value == null ? option.getDefaultValue() : (T) value; } @Override @SuppressWarnings("unchecked") public > @Nullable T get(@NonNull ApolloPlayer player, @NonNull C option) { - Object value = this.playerOptions.getOrDefault(player, Collections.emptyMap()).get(option); + option = (C) this.registry.get(option.getKey()); + Object value = this.playerOptions.getOrDefault(player.getUniqueId(), Collections.emptyMap()).get(option.getKey()); return value == null ? this.get(option) : (T) value; } @Override @SuppressWarnings("unchecked") public > Optional getDirect(@NonNull C option) { - Object value = this.options.get(option); + option = (C) this.registry.get(option.getKey()); + Object value = this.options.get(option.getKey()); return value == null ? Optional.empty() : Optional.of((T) value); } @Override @SuppressWarnings("unchecked") public > Optional getDirect(@NonNull ApolloPlayer player, @NonNull C option) { - Object value = this.playerOptions.getOrDefault(player, Collections.emptyMap()).get(option); + option = (C) this.registry.get(option.getKey()); + Object value = this.playerOptions.getOrDefault(player.getUniqueId(), Collections.emptyMap()).get(option.getKey()); return value == null ? this.getDirect(option) : Optional.of((T) value); } @Override public void set(@NonNull Option option, @Nullable T value) { + option = this.registry.get(option.getKey()); Object nextValue = value == null ? option.getDefaultValue() : value; if (this.postEvent(option, null, nextValue)) { return; @@ -110,9 +117,9 @@ public void set(@NonNull Option option, @Nullable T value) { Object currentValue; if (Objects.equals(nextValue, option.getDefaultValue())) { - currentValue = this.options.remove(option); + currentValue = this.options.remove(option.getKey()); } else { - currentValue = this.options.put(option, value); + currentValue = this.options.put(option.getKey(), value); } if (!Objects.equals(currentValue, value)) { @@ -122,6 +129,7 @@ public void set(@NonNull Option option, @Nullable T value) { @Override public void set(@NonNull ApolloPlayer player, @NonNull Option option, @Nullable T value) { + option = this.registry.get(option.getKey()); Object globalValue = this.get(option); Object nextValue = value == null ? globalValue : value; if (this.postEvent(option, player, nextValue)) { @@ -130,11 +138,11 @@ public void set(@NonNull ApolloPlayer player, @NonNull Option optio Object currentValue; if (Objects.equals(value, globalValue)) { - currentValue = this.playerOptions.computeIfAbsent(player, k -> Collections.synchronizedMap(new WeakHashMap<>())) - .remove(option); + currentValue = this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())) + .remove(option.getKey()); } else { - currentValue = this.playerOptions.computeIfAbsent(player, k -> Collections.synchronizedMap(new WeakHashMap<>())) - .put(option, value); + currentValue = this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())) + .put(option.getKey(), value); } if (!Objects.equals(currentValue, value)) { @@ -144,11 +152,12 @@ public void set(@NonNull ApolloPlayer player, @NonNull Option optio @Override public void add(@NonNull Option option, @NonNull T value) { + option = this.registry.get(option.getKey()); if (this.postEvent(option, null, value)) { return; } - Object currentValue = this.options.put(option, value); + Object currentValue = this.options.put(option.getKey(), value); if (!Objects.equals(currentValue, value)) { this.postPacket(option, null, value); @@ -157,12 +166,13 @@ public void add(@NonNull Option option, @NonNull T value) { @Override public void add(@NonNull ApolloPlayer player, @NonNull Option option, @NonNull T value) { + option = this.registry.get(option.getKey()); if (this.postEvent(option, player, value)) { return; } - Object currentValue = this.playerOptions.computeIfAbsent(player, k -> Collections.synchronizedMap(new WeakHashMap<>())) - .put(option, value); + Object currentValue = this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())) + .put(option.getKey(), value); if (!Objects.equals(currentValue, value)) { this.postPacket(option, player, value); @@ -171,22 +181,24 @@ public void add(@NonNull ApolloPlayer player, @NonNull Option optio @Override public void remove(@NonNull Option option, @Nullable T compare) { + option = this.registry.get(option.getKey()); if (this.postEvent(option, null, option.getDefaultValue())) { return; } - if (this.options.remove(option, compare)) { + if (this.options.remove(option.getKey(), compare)) { this.postPacket(option, null, option.getDefaultValue()); } } @Override public void remove(@NonNull ApolloPlayer player, @NonNull Option option, @Nullable T compare) { + option = this.registry.get(option.getKey()); if (this.postEvent(option, player, this.get(option))) { return; } - if (this.playerOptions.computeIfAbsent(player, k -> Collections.synchronizedMap(new WeakHashMap<>())).remove(option, compare)) { + if (this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())).remove(option.getKey(), compare)) { this.postPacket(option, player, option.getDefaultValue()); } } @@ -194,18 +206,19 @@ public void remove(@NonNull ApolloPlayer player, @NonNull Option op @Override @SuppressWarnings("unchecked") public void replace(@NonNull Option option, @NonNull BiFunction, T, T> remappingFunction) { + Option targetOption = this.registry.get(option.getKey()); this.options.replaceAll((k, v) -> { - T value = remappingFunction.apply(option, (T) v); + T value = remappingFunction.apply(targetOption, (T) v); if (value == null) { - value = (T) option.getDefaultValue(); + value = (T) targetOption.getDefaultValue(); } - if (this.postEvent(option, null, value)) { + if (this.postEvent(targetOption, null, value)) { return null; } if (!Objects.equals(v, value)) { - this.postPacket(option, null, value); + this.postPacket(targetOption, null, value); } return value; @@ -215,19 +228,20 @@ public void replace(@NonNull Option option, @NonNull BiFunction void replace(@NonNull ApolloPlayer player, @NonNull Option option, @NonNull BiFunction, T, T> remappingFunction) { - this.playerOptions.computeIfAbsent(player, k -> Collections.synchronizedMap(new WeakHashMap<>())) + Option targetOption = this.registry.get(option.getKey()); + this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())) .replaceAll((k, v) -> { - T value = remappingFunction.apply(option, (T) v); + T value = remappingFunction.apply(targetOption, (T) v); if (value == null) { - value = (T) option.getDefaultValue(); + value = (T) targetOption.getDefaultValue(); } - if (this.postEvent(option, player, value)) { + if (this.postEvent(targetOption, player, value)) { return null; } if (!Objects.equals(v, value)) { - this.postPacket(option, player, value); + this.postPacket(targetOption, player, value); } return value; @@ -235,98 +249,13 @@ public void replace(@NonNull ApolloPlayer player, @NonNull Option o } @Override - public @NonNull Iterator> iterator() { - return this.options.keySet().iterator(); + public > void register(C option) { + this.registry.put(option.getKey(), option); } - /** - * Wraps the provided value into a protobuf {@link Value}. - * - * @param valueBuilder the value builder - * @param type the value type - * @param current the current value - * @return the wrapped value - * @since 1.0.0 - */ - public Value wrapValue(Value.Builder valueBuilder, Type type, @Nullable Object current) { - if (current == null) { - return valueBuilder.setNullValue(NullValue.NULL_VALUE).build(); - } - - Type boxed = GenericTypeReflector.box(type); - Class clazz = GenericTypeReflector.erase(boxed); - - if (clazz.isEnum()) { - return valueBuilder.setStringValue(((Enum) current).name()).build(); - } else if (Number.class.isAssignableFrom(clazz)) { - return valueBuilder.setNumberValue(((Number) current).doubleValue()).build(); - } else if (String.class.isAssignableFrom(clazz)) { - return valueBuilder.setStringValue((String) current).build(); - } else if (Boolean.class.isAssignableFrom(clazz)) { - return valueBuilder.setBoolValue((Boolean) current).build(); - } else if (List.class.isAssignableFrom(clazz)) { - AnnotatedType elementType = this.elementType(boxed); - ListValue.Builder listBuilder = ListValue.newBuilder(); - for (Object object : (List) current) { - listBuilder.addValues(this.wrapValue(Value.newBuilder(), elementType.getType(), object)); - } - - return valueBuilder.setListValue(listBuilder.build()).build(); - } else if (Color.class.isAssignableFrom(clazz)) { - if (current instanceof String) { - String string = (String) current; - return valueBuilder.setStringValue(string).build(); - } else if (current instanceof Color) { - Color currentColor = (Color) current; - return valueBuilder.setStringValue(Integer.toHexString(currentColor.getRGB())).build(); - } else { - throw new RuntimeException("Unable to wrap Color value of type '" + clazz.getSimpleName() + "'!"); - - } - } - - throw new RuntimeException("Unable to wrap value of type '" + clazz.getSimpleName() + "'!"); - } - - /** - * Unwraps the provided protobuf {@link Value} into the appropriate object. - * - * @param wrapper the wrapped value - * @param type the wrapped type - * @return the unwrapped value - * @since 1.0.0 - */ - @SuppressWarnings({"unchecked", "rawtypes"}) - public @Nullable Object unwrapValue(Value wrapper, Type type) { - if (wrapper.hasNullValue()) { - return null; - } - - Type boxed = GenericTypeReflector.box(type); - Class clazz = GenericTypeReflector.erase(boxed); - - if (clazz.isEnum() && wrapper.hasStringValue()) { - return Enum.valueOf((Class) clazz, wrapper.getStringValue()); - } else if (Number.class.isAssignableFrom(clazz) && wrapper.hasNumberValue()) { - return wrapper.getNumberValue(); - } else if (String.class.isAssignableFrom(clazz) && wrapper.hasStringValue()) { - return wrapper.getStringValue(); - } else if (Boolean.class.isAssignableFrom(clazz) && wrapper.hasBoolValue()) { - return wrapper.getBoolValue(); - } else if (List.class.isAssignableFrom(clazz) && wrapper.hasListValue()) { - AnnotatedType elementType = this.elementType(boxed); - ListValue listValue = wrapper.getListValue(); - List list = new ArrayList<>(listValue.getValuesCount()); - for (int i = 0; i < listValue.getValuesCount(); i++) { - list.add(this.unwrapValue(listValue.getValues(i), elementType.getType())); - } - - return Collections.unmodifiableList(list); - } else if (Color.class.isAssignableFrom(clazz) && wrapper.hasStringValue()) { - return wrapper.getStringValue(); - } - - throw new RuntimeException("Unable to unwrap value of type '" + clazz.getSimpleName() + "'!"); + @Override + public @NonNull Iterator> iterator() { + return this.registry.values().iterator(); } protected boolean postEvent(Option option, @Nullable ApolloPlayer player, @Nullable Object value) { @@ -348,17 +277,8 @@ protected void postPacket(Option option, @Nullable ApolloPlayer player, Collection players = player == null ? Apollo.getPlayerManager() .getPlayers() : Collections.singleton(player); - Value valueWrapper = this.wrapValue(Value.newBuilder(), option.getTypeToken().getType(), value); + Value valueWrapper = NetworkOptions.wrapValue(Value.newBuilder(), option.getTypeToken().getType(), value); NetworkOptions.sendOption(this.module, option, valueWrapper, players); } - private AnnotatedType elementType(Type type) { - AnnotatedType elementType = GenericTypeReflector.annotate(type); - if(!(elementType instanceof AnnotatedParameterizedType)) { - throw new RuntimeException("Raw types for lists are not supported!"); - } - - return ((AnnotatedParameterizedType) elementType).getAnnotatedActualTypeArguments()[0]; - } - } diff --git a/common/src/main/java/com/lunarclient/apollo/option/StatusOptionsImpl.java b/common/src/main/java/com/lunarclient/apollo/option/StatusOptionsImpl.java new file mode 100644 index 000000000..8b1edfc9c --- /dev/null +++ b/common/src/main/java/com/lunarclient/apollo/option/StatusOptionsImpl.java @@ -0,0 +1,81 @@ +/* + * 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.option; + +import com.lunarclient.apollo.player.ApolloPlayer; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Objects; +import lombok.NonNull; +import org.jetbrains.annotations.Nullable; + +/** + * Represents the {@link Options} implementation for the mod status API. + * + * @since 1.2.1 + */ +public class StatusOptionsImpl extends OptionsImpl { + + /** + * Constructs a new {@link StatusOptionsImpl}. + * + * @param options the mod options with default values + * @since 1.2.1 + */ + public StatusOptionsImpl(Collection> options) { + super(null, options); + } + + @Override + public void set(@NonNull ApolloPlayer player, @NonNull Option option, @Nullable T value) { + option = this.registry.get(option.getKey()); + Object globalValue = this.get(option); + Object nextValue = value == null ? globalValue : value; + + Object currentValue; + if (Objects.equals(value, globalValue)) { + currentValue = this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())) + .remove(option.getKey()); + } else { + currentValue = this.playerOptions.computeIfAbsent(player.getUniqueId(), k -> Collections.synchronizedMap(new HashMap<>())) + .put(option.getKey(), value); + } + + if (!Objects.equals(currentValue, value)) { + this.postEvent(option, player, nextValue); + } + } + + @Override + protected boolean postEvent(Option option, @Nullable ApolloPlayer player, @Nullable Object value) { + return false; + } + + @Override + protected void postPacket(Option option, @Nullable ApolloPlayer player, @Nullable Object value) { + + } + +} diff --git a/common/src/main/java/com/lunarclient/apollo/option/config/CommonSerializers.java b/common/src/main/java/com/lunarclient/apollo/option/config/CommonSerializers.java index 3b65c17a8..c970f47ab 100644 --- a/common/src/main/java/com/lunarclient/apollo/option/config/CommonSerializers.java +++ b/common/src/main/java/com/lunarclient/apollo/option/config/CommonSerializers.java @@ -59,27 +59,31 @@ public Color deserialize(Type type, ConfigurationNode node) throws Serialization stringValue = stringValue.substring(1); } - if (stringValue.length() != 8) { - throw new NumberFormatException("Invalid color string length: " + stringValue); + if (stringValue.length() == 6) { + return new Color(Integer.parseInt(stringValue, 16)); } - long rgba = Long.parseLong(stringValue, 16); - int alpha = (int) ((rgba >> 24) & 0xFF); - int red = (int) ((rgba >> 16) & 0xFF); - int green = (int) ((rgba >> 8) & 0xFF); - int blue = (int) (rgba & 0xFF); + if (stringValue.length() == 8) { + long rgba = Long.parseLong(stringValue, 16); + int alpha = (int) ((rgba >> 24) & 0xFF); + int red = (int) ((rgba >> 16) & 0xFF); + int green = (int) ((rgba >> 8) & 0xFF); + int blue = (int) (rgba & 0xFF); - return new Color(red, green, blue, alpha); + return new Color(red, green, blue, alpha); + } + + throw new NumberFormatException("Invalid color string length: " + stringValue); } @Override public void serialize(Type type, @Nullable Color color, ConfigurationNode node) throws SerializationException { if (color == null) { - node.set("#FFFFFF"); + node.set(null); return; } - node.set(String.format("#%06X", (0xFFFFFF & color.getRGB()))); + node.set(String.format("#%08X", color.getRGB())); } } diff --git a/common/src/main/java/com/lunarclient/apollo/player/AbstractApolloPlayer.java b/common/src/main/java/com/lunarclient/apollo/player/AbstractApolloPlayer.java index f1044b7a7..fd2be6d34 100644 --- a/common/src/main/java/com/lunarclient/apollo/player/AbstractApolloPlayer.java +++ b/common/src/main/java/com/lunarclient/apollo/player/AbstractApolloPlayer.java @@ -32,6 +32,7 @@ import com.lunarclient.apollo.client.version.LunarClientVersion; import com.lunarclient.apollo.client.version.MinecraftVersion; import com.lunarclient.apollo.common.location.ApolloLocation; +import com.lunarclient.apollo.module.paynow.PayNowEmbeddedCheckoutSupport; import com.lunarclient.apollo.module.tebex.TebexEmbeddedCheckoutSupport; import com.lunarclient.apollo.roundtrip.ApolloRequest; import com.lunarclient.apollo.roundtrip.ApolloResponse; @@ -53,6 +54,7 @@ public abstract class AbstractApolloPlayer implements ApolloPlayer { private LunarClientVersion lunarClientVersion; private List installedMods; private TebexEmbeddedCheckoutSupport tebexEmbeddedCheckoutSupport; + private PayNowEmbeddedCheckoutSupport payNowEmbeddedCheckoutSupport; @Override public Optional getWorld() { diff --git a/common/src/main/java/com/lunarclient/apollo/player/ApolloPlayerManagerImpl.java b/common/src/main/java/com/lunarclient/apollo/player/ApolloPlayerManagerImpl.java index ddb1f6aef..d0952fc99 100644 --- a/common/src/main/java/com/lunarclient/apollo/player/ApolloPlayerManagerImpl.java +++ b/common/src/main/java/com/lunarclient/apollo/player/ApolloPlayerManagerImpl.java @@ -23,6 +23,7 @@ */ package com.lunarclient.apollo.player; +import com.google.protobuf.Value; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.client.mod.LunarClientMod; import com.lunarclient.apollo.client.mod.LunarClientModType; @@ -32,6 +33,9 @@ import com.lunarclient.apollo.event.player.ApolloPlayerHandshakeEvent; import com.lunarclient.apollo.event.player.ApolloRegisterPlayerEvent; import com.lunarclient.apollo.event.player.ApolloUnregisterPlayerEvent; +import com.lunarclient.apollo.module.modsetting.ModSettingModule; +import com.lunarclient.apollo.module.modsettings.ModSettingModuleImpl; +import com.lunarclient.apollo.module.paynow.PayNowEmbeddedCheckoutSupport; import com.lunarclient.apollo.module.tebex.TebexEmbeddedCheckoutSupport; import com.lunarclient.apollo.network.NetworkOptions; import com.lunarclient.apollo.player.v1.PlayerHandshakeMessage; @@ -137,25 +141,47 @@ public void handlePlayerHandshake(@NotNull ApolloPlayer player, @NotNull PlayerH .build() ).collect(Collectors.toList()); - TebexEmbeddedCheckoutSupport checkoutSupportType; + int embeddedCheckoutSupport = message.getEmbeddedCheckoutSupportValue(); + TebexEmbeddedCheckoutSupport tebexEmbeddedCheckoutSupport; try { - checkoutSupportType = TebexEmbeddedCheckoutSupport.values()[message.getEmbeddedCheckoutSupportValue() - 1]; + tebexEmbeddedCheckoutSupport = TebexEmbeddedCheckoutSupport.values()[embeddedCheckoutSupport - 1]; } catch (ArrayIndexOutOfBoundsException e) { - checkoutSupportType = TebexEmbeddedCheckoutSupport.UNSUPPORTED; + tebexEmbeddedCheckoutSupport = TebexEmbeddedCheckoutSupport.UNSUPPORTED; } - EventBus.EventResult result = EventBus.getBus() - .post(new ApolloPlayerHandshakeEvent(player, minecraftVersion, lunarClientVersion, mods, checkoutSupportType)); - - for (Throwable throwable : result.getThrowing()) { - throwable.printStackTrace(); + PayNowEmbeddedCheckoutSupport payNowEmbeddedCheckoutSupport; + try { + payNowEmbeddedCheckoutSupport = PayNowEmbeddedCheckoutSupport.values()[embeddedCheckoutSupport - 1]; + } catch (ArrayIndexOutOfBoundsException e) { + payNowEmbeddedCheckoutSupport = PayNowEmbeddedCheckoutSupport.UNSUPPORTED; } AbstractApolloPlayer apolloPlayer = ((AbstractApolloPlayer) player); apolloPlayer.setMinecraftVersion(minecraftVersion); apolloPlayer.setLunarClientVersion(lunarClientVersion); apolloPlayer.setInstalledMods(mods); - apolloPlayer.setTebexEmbeddedCheckoutSupport(checkoutSupportType); + apolloPlayer.setTebexEmbeddedCheckoutSupport(tebexEmbeddedCheckoutSupport); + apolloPlayer.setPayNowEmbeddedCheckoutSupport(payNowEmbeddedCheckoutSupport); + + Map modStatus = message.getModStatusMap(); + if (!modStatus.isEmpty()) { + ModSettingModuleImpl modSettingModule = (ModSettingModuleImpl) Apollo.getModuleManager().getModule(ModSettingModule.class); + + if (modSettingModule.isEnabled()) { + modSettingModule.updateOptions(apolloPlayer, modStatus, false); + } + } + + ApolloPlayerHandshakeEvent event = new ApolloPlayerHandshakeEvent( + player, minecraftVersion, lunarClientVersion, mods, + tebexEmbeddedCheckoutSupport, payNowEmbeddedCheckoutSupport + ); + + EventBus.EventResult result = EventBus.getBus().post(event); + + for (Throwable throwable : result.getThrowing()) { + throwable.printStackTrace(); + } } } diff --git a/docs/developers/events.mdx b/docs/developers/events.mdx index 18f36fa4b..f6af36f80 100644 --- a/docs/developers/events.mdx +++ b/docs/developers/events.mdx @@ -161,7 +161,7 @@ _Called when the Apollo player sends an Apollo packet to Lunar Client._ ### ApolloUpdateOptionEvent -_Called when an option is updated._ +_Called when an Apollo option is updated._ | Field | Description | | ------------------------ | -------------------------------------------------------------------------------- | @@ -174,6 +174,21 @@ _Called when an option is updated._ +
+ApolloUpdateModOptionEvent + +### ApolloUpdateModOptionEvent + +_Called when a Lunar Client Mod option is updated._ + +| Field | Description | +| ------------------------ | --------------------------------------------- | +| `ApolloPlayer player` | The Apollo player the option was updated for. | +| `Option option` | The option that was updated. | +| `Object value` | The new value of the option. | + +
+
ApolloPlayerChatCloseEvent diff --git a/docs/developers/lightweight/introduction.mdx b/docs/developers/lightweight/introduction.mdx index dc7b49ef6..b581efbe9 100644 --- a/docs/developers/lightweight/introduction.mdx +++ b/docs/developers/lightweight/introduction.mdx @@ -1,6 +1,6 @@ # Lightweight -Our lightweight integration allows for Apollo features to be used, without the need for running the entire Apollo plugin. We will introduce you to two different methods that achieve the same goal, while utilizing separate approaches. Each method offers different trade-offs between complexity, flexibility, and performance. Choose the method that best fits your use case and environment. +Our lightweight integration allows for Apollo features to be used, without the need for running the entire Apollo plugin. We will introduce you to two different methods that achieve the same goal, while utilizing separate approaches. Each method offers different trade-offs between complexity and flexibility. Choose the method that best fits your use case and environment. ## Message format diff --git a/docs/developers/lightweight/protobuf/getting-started.mdx b/docs/developers/lightweight/protobuf/getting-started.mdx index 3330c63c3..2304efe1c 100644 --- a/docs/developers/lightweight/protobuf/getting-started.mdx +++ b/docs/developers/lightweight/protobuf/getting-started.mdx @@ -26,7 +26,7 @@ Available fields for each message, including their types, are available on the B com.lunarclient apollo-protos - 0.0.2 + 0.0.5 ``` @@ -41,7 +41,7 @@ Available fields for each message, including their types, are available on the B } dependencies { - api 'com.lunarclient:apollo-protos:0.0.2' + api 'com.lunarclient:apollo-protos:0.0.5' } ``` @@ -55,7 +55,7 @@ Available fields for each message, including their types, are available on the B } dependencies { - api("com.lunarclient:apollo-protos:0.0.2") + api("com.lunarclient:apollo-protos:0.0.5") } ``` diff --git a/docs/developers/minestom.mdx b/docs/developers/minestom.mdx index bf26ef883..7b0dfb62f 100644 --- a/docs/developers/minestom.mdx +++ b/docs/developers/minestom.mdx @@ -52,14 +52,14 @@ Next, add the `apollo-minestom` dependency to your project. ```kotlin filename="build.gradle.kts" dependencies { - implementation("com.lunarclient:apollo-minestom:1.2.0") + implementation("com.lunarclient:apollo-minestom:1.2.1") } ``` ```groovy filename="build.gradle" dependencies { - implementation 'com.lunarclient:apollo-minestom:1.2.0' + implementation 'com.lunarclient:apollo-minestom:1.2.1' } ``` @@ -69,7 +69,7 @@ Next, add the `apollo-minestom` dependency to your project. com.lunarclient apollo-minestom - 1.2.0 + 1.2.1 compile diff --git a/docs/developers/mods/_meta.json b/docs/developers/mods/_meta.json index 2771a51f3..f3b20c7bd 100644 --- a/docs/developers/mods/_meta.json +++ b/docs/developers/mods/_meta.json @@ -2,6 +2,7 @@ "2ditems": "2dItems", "3dskins": "3dSkins", "armorstatus": "Armorstatus", + "audiosubtitles": "AudioSubtitles", "autotextactions": "AutoTextActions", "autotexthotkey": "AutoTextHotkey", "blockoutline": "BlockOutline", @@ -39,6 +40,7 @@ "memory": "Memory", "menublur": "MenuBlur", "minimap": "Minimap", + "mobsize": "MobSize", "momentum": "Momentum", "motionblur": "MotionBlur", "mumblelink": "MumbleLink", @@ -57,6 +59,7 @@ "radio": "Radio", "reachdisplay": "ReachDisplay", "replaymod": "Replaymod", + "rewind": "Rewind", "saturation": "Saturation", "sba": "Sba", "scoreboard": "Scoreboard", diff --git a/docs/developers/mods/armorstatus.mdx b/docs/developers/mods/armorstatus.mdx index 5f451abe9..1c2a8556b 100644 --- a/docs/developers/mods/armorstatus.mdx +++ b/docs/developers/mods/armorstatus.mdx @@ -26,8 +26,8 @@ public void toggleArmorStatusExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`MOVE_ARMOR_INDIVIDUALLY`__ - Config Key: `move-armor-individually` @@ -60,6 +60,7 @@ public void toggleArmorStatusExample(Player viewer, boolean value) { - Default: `false` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/audiosubtitles.mdx b/docs/developers/mods/audiosubtitles.mdx new file mode 100644 index 000000000..649465b66 --- /dev/null +++ b/docs/developers/mods/audiosubtitles.mdx @@ -0,0 +1,76 @@ +# Audio Subtitles + +Allows you to customize Minecraft's audio subtitles, if enabled. + +## Integration + +### How to toggle the mod + +```java +public void toggleAudioSubtitlesExample(Player viewer, boolean value) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); + apolloPlayerOpt.ifPresent(apolloPlayer -> this.modSettingModule.getOptions().set(apolloPlayer, ModAudioSubtitles.ENABLED, value)); +} +``` + +## Available options + +- __`ENABLED`__ + - Config Key: `enabled` + - Values + - Type: `Boolean` + - Default: `false` + +- __`SCALE`__ + - Config Key: `scale` + - Values + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`TEXT_SHADOW`__ + - Adds a shadow to text + - Config Key: `text-shadow` + - Values + - Type: `Boolean` + - Default: `false` + +- __`BACKGROUND`__ + - Config Key: `background` + - Values + - Type: `Boolean` + - Default: `true` + +- __`BORDER`__ + - Config Key: `border` + - Values + - Type: `Boolean` + - Default: `false` + +- __`BORDER_THICKNESS`__ + - Config Key: `border-thickness` + - Values + - Type: `Float` + - Default: `0.5F` + - Minimum: `0.5F` + - Maximum: `3.0F` + +- __`BORDER_COLOR`__ + - Config Key: `border-color` + - Values + - Type: `String` + - Default: `#9F000000` + +- __`BACKGROUND_COLOR`__ + - Config Key: `background-color` + - Values + - Type: `String` + - Default: `#CC000000` + +- __`TEXT_COLOR`__ + - Config Key: `text-color` + - Values + - Type: `String` + - Default: `#FFFFFFFF` + diff --git a/docs/developers/mods/clock.mdx b/docs/developers/mods/clock.mdx index 917c4e51e..dbbfb54cd 100644 --- a/docs/developers/mods/clock.mdx +++ b/docs/developers/mods/clock.mdx @@ -26,10 +26,23 @@ public void toggleClockExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`MILITARY_TIME`__ + - Config Key: `military-time` + - Values + - Type: `Boolean` + - Default: `false` + +- __`SHOW_AM_PM`__ + - Config Key: `show-am-pm` + - Values + - Type: `Boolean` + - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -115,15 +128,3 @@ public void toggleClockExample(Player viewer, boolean value) { - Type: `String` - Default: `#FFFFFFFF` -- __`MILITARY_TIME`__ - - Config Key: `military-time` - - Values - - Type: `Boolean` - - Default: `false` - -- __`SHOW_AM_PM`__ - - Config Key: `show-am-pm` - - Values - - Type: `Boolean` - - Default: `true` - diff --git a/docs/developers/mods/combo.mdx b/docs/developers/mods/combo.mdx index b59061b60..6d24167e4 100644 --- a/docs/developers/mods/combo.mdx +++ b/docs/developers/mods/combo.mdx @@ -26,10 +26,11 @@ public void toggleComboCounterExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/cooldowns.mdx b/docs/developers/mods/cooldowns.mdx index bb9e37a95..ed04eb83d 100644 --- a/docs/developers/mods/cooldowns.mdx +++ b/docs/developers/mods/cooldowns.mdx @@ -26,6 +26,6 @@ public void toggleCooldownsExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` diff --git a/docs/developers/mods/coordinates.mdx b/docs/developers/mods/coordinates.mdx index d50cd9d66..55d317fb2 100644 --- a/docs/developers/mods/coordinates.mdx +++ b/docs/developers/mods/coordinates.mdx @@ -26,10 +26,11 @@ public void toggleCoordinatesExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/cps.mdx b/docs/developers/mods/cps.mdx index 3567c072c..97c89bf24 100644 --- a/docs/developers/mods/cps.mdx +++ b/docs/developers/mods/cps.mdx @@ -26,10 +26,41 @@ public void toggleCPSExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`RIGHT_CLICK`__ + - Config Key: `right-click` + - Values + - Type: `Boolean` + - Default: `false` + +- __`LINE_COLOR`__ + - Config Key: `line-color` + - Values + - Type: `String` + - Default: `#FF202020` + +- __`SHOW_CPSTEXT`__ + - Config Key: `show-c-p-s-text` + - Values + - Type: `Boolean` + - Default: `true` + +- __`REVERSE_TEXT`__ + - Config Key: `reverse-text` + - Values + - Type: `Boolean` + - Default: `false` + +- __`IGNORE_CANCELLED_CLICKS`__ + - Config Key: `ignore-cancelled-clicks` + - Values + - Type: `Boolean` + - Default: `false` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -115,33 +146,3 @@ public void toggleCPSExample(Player viewer, boolean value) { - Type: `String` - Default: `#FFFFFFFF` -- __`RIGHT_CLICK`__ - - Config Key: `right-click` - - Values - - Type: `Boolean` - - Default: `false` - -- __`LINE_COLOR`__ - - Config Key: `line-color` - - Values - - Type: `String` - - Default: `#FF202020` - -- __`SHOW_CPSTEXT`__ - - Config Key: `show-c-p-s-text` - - Values - - Type: `Boolean` - - Default: `true` - -- __`REVERSE_TEXT`__ - - Config Key: `reverse-text` - - Values - - Type: `Boolean` - - Default: `false` - -- __`IGNORE_CANCELLED_CLICKS`__ - - Config Key: `ignore-cancelled-clicks` - - Values - - Type: `Boolean` - - Default: `false` - diff --git a/docs/developers/mods/daycounter.mdx b/docs/developers/mods/daycounter.mdx index b81d78a88..881e19dc1 100644 --- a/docs/developers/mods/daycounter.mdx +++ b/docs/developers/mods/daycounter.mdx @@ -26,10 +26,18 @@ public void toggleDayCounterExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`USE_WORLD_TYPE`__ + - If enabled, this will show the day of the world. If disabled, it will display your playtime in that world. + - Config Key: `use-world-type` + - Values + - Type: `Boolean` + - Default: `false` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -115,10 +123,3 @@ public void toggleDayCounterExample(Player viewer, boolean value) { - Type: `String` - Default: `#FFFFFFFF` -- __`USE_WORLD_TYPE`__ - - If enabled, this will show the day of the world. If disabled, it will display your playtime in that world. - - Config Key: `use-world-type` - - Values - - Type: `Boolean` - - Default: `false` - diff --git a/docs/developers/mods/directionhud.mdx b/docs/developers/mods/directionhud.mdx index 00bac58cc..b91dc07bd 100644 --- a/docs/developers/mods/directionhud.mdx +++ b/docs/developers/mods/directionhud.mdx @@ -26,8 +26,8 @@ public void toggleDirectionHUDExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`WIDTH`__ - Config Key: `width` @@ -38,6 +38,7 @@ public void toggleDirectionHUDExample(Player viewer, boolean value) { - Maximum: `448.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/fog.mdx b/docs/developers/mods/fog.mdx index a8d02a0ea..2c577a3f7 100644 --- a/docs/developers/mods/fog.mdx +++ b/docs/developers/mods/fog.mdx @@ -37,6 +37,22 @@ public void toggleFogCustomizerExample(Player viewer, boolean value) { - Minimum: `0.0F` - Maximum: `1.95F` +- __`ATMOSPHERIC_FOG_DENSITY`__ + - Config Key: `atmospheric-fog-density` + - Values + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.0F` + - Maximum: `1.95F` + +- __`DIMENSION_FOG_DENSITY`__ + - Config Key: `dimension-fog-density` + - Values + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.0F` + - Maximum: `1.95F` + - __`RENDER_DISTANCE_FOG_COLOR_TOGGLE`__ - Config Key: `render-distance-fog-color-toggle` - Values @@ -49,3 +65,27 @@ public void toggleFogCustomizerExample(Player viewer, boolean value) { - Type: `String` - Default: `#C0D8FF` +- __`ATMOSPHERIC_FOG_COLOR_TOGGLE`__ + - Config Key: `atmospheric-fog-color-toggle` + - Values + - Type: `Boolean` + - Default: `false` + +- __`ATMOSPHERIC_FOG_COLOR`__ + - Config Key: `atmospheric-fog-color` + - Values + - Type: `String` + - Default: `#C0D0FF` + +- __`DIMENSION_FOG_COLOR_TOGGLE`__ + - Config Key: `dimension-fog-color-toggle` + - Values + - Type: `Boolean` + - Default: `false` + +- __`DIMENSION_FOG_COLOR`__ + - Config Key: `dimension-fog-color` + - Values + - Type: `String` + - Default: `#C0D0FF` + diff --git a/docs/developers/mods/fps.mdx b/docs/developers/mods/fps.mdx index 32b413f0d..d6db77609 100644 --- a/docs/developers/mods/fps.mdx +++ b/docs/developers/mods/fps.mdx @@ -26,10 +26,11 @@ public void toggleFPSExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/hypixelbedwars.mdx b/docs/developers/mods/hypixelbedwars.mdx index 8f4f04366..2c5719b92 100644 --- a/docs/developers/mods/hypixelbedwars.mdx +++ b/docs/developers/mods/hypixelbedwars.mdx @@ -28,6 +28,13 @@ public void toggleHypixelBedwarsExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `true` +- __`ENABLE_PRACTICE_COLOR`__ + - Recolor the beds in bedwars practice mode + - Config Key: `enable-practice-color` + - Values + - Type: `Boolean` + - Default: `false` + - __`BW_HARDCORE_HEARTS`__ - Replaces normal hearts with hardcore hearts once your bed is lost - Config Key: `bw-hardcore-hearts` @@ -35,3 +42,27 @@ public void toggleHypixelBedwarsExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `true` +- __`CUSTOM_TRAP_ALERT`__ + - Config Key: `custom-trap-alert` + - Values + - Type: `Boolean` + - Default: `false` + +- __`MUTE_ALERT_SOUND`__ + - Config Key: `mute-alert-sound` + - Values + - Type: `Boolean` + - Default: `false` + +- __`ALERT_PRIMARY_COLOR`__ + - Config Key: `alert-primary-color` + - Values + - Type: `String` + - Default: `#FFFFFFFF` + +- __`ALERT_SUB_COLOR`__ + - Config Key: `alert-sub-color` + - Values + - Type: `String` + - Default: `#FFFFFFFF` + diff --git a/docs/developers/mods/itemtracker.mdx b/docs/developers/mods/itemtracker.mdx index 3c896b457..08ab0d848 100644 --- a/docs/developers/mods/itemtracker.mdx +++ b/docs/developers/mods/itemtracker.mdx @@ -26,10 +26,11 @@ public void toggleItemTrackerExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/keystrokes.mdx b/docs/developers/mods/keystrokes.mdx index 8d1e21347..6a6e5c891 100644 --- a/docs/developers/mods/keystrokes.mdx +++ b/docs/developers/mods/keystrokes.mdx @@ -26,8 +26,8 @@ public void toggleKeyStrokesExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`KEY_STROKES_CLICKS`__ - Config Key: `key-strokes-clicks` @@ -66,6 +66,7 @@ public void toggleKeyStrokesExample(Player viewer, boolean value) { - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/memory.mdx b/docs/developers/mods/memory.mdx index eba8b9250..2889c33f9 100644 --- a/docs/developers/mods/memory.mdx +++ b/docs/developers/mods/memory.mdx @@ -26,10 +26,41 @@ public void toggleMemoryUsageExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`COLOR_BASED_ON_USAGE`__ + - Config Key: `color-based-on-usage` + - Values + - Type: `Boolean` + - Default: `false` + +- __`LOW_MEM_COLOR`__ + - Config Key: `low-mem-color` + - Values + - Type: `String` + - Default: `#FFFF0000` + +- __`MED_MEM_COLOR`__ + - Config Key: `med-mem-color` + - Values + - Type: `String` + - Default: `#FFFFFF00` + +- __`HIGH_MEM_COLOR`__ + - Config Key: `high-mem-color` + - Values + - Type: `String` + - Default: `#FF00FF00` + +- __`TEXT_COLOR`__ + - Config Key: `text-color` + - Values + - Type: `String` + - Default: `#FFFFFFFF` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -109,33 +140,3 @@ public void toggleMemoryUsageExample(Player viewer, boolean value) { - Type: `String` - Default: `#6F000000` -- __`TEXT_COLOR`__ - - Config Key: `text-color` - - Values - - Type: `String` - - Default: `#FFFFFFFF` - -- __`COLOR_BASED_ON_USAGE`__ - - Config Key: `color-based-on-usage` - - Values - - Type: `Boolean` - - Default: `false` - -- __`LOW_MEM_COLOR`__ - - Config Key: `low-mem-color` - - Values - - Type: `String` - - Default: `#FFFF0000` - -- __`MED_MEM_COLOR`__ - - Config Key: `med-mem-color` - - Values - - Type: `String` - - Default: `#FFFFFF00` - -- __`HIGH_MEM_COLOR`__ - - Config Key: `high-mem-color` - - Values - - Type: `String` - - Default: `#FF00FF00` - diff --git a/docs/developers/mods/minimap.mdx b/docs/developers/mods/minimap.mdx index 6c6e83be9..64ab81c56 100644 --- a/docs/developers/mods/minimap.mdx +++ b/docs/developers/mods/minimap.mdx @@ -26,8 +26,8 @@ public void toggleMinimapExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`MAP_WIDTH`__ - Config Key: `map-width` diff --git a/docs/developers/mods/mobsize.mdx b/docs/developers/mods/mobsize.mdx new file mode 100644 index 000000000..35383445f --- /dev/null +++ b/docs/developers/mods/mobsize.mdx @@ -0,0 +1,55 @@ +# Mob Size + +Changes the size of mobs. + +## Integration + +### How to toggle the mod + +```java +public void toggleMobSizeExample(Player viewer, boolean value) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); + apolloPlayerOpt.ifPresent(apolloPlayer -> this.modSettingModule.getOptions().set(apolloPlayer, ModMobSize.ENABLED, value)); +} +``` + +## Available options + +- __`ENABLED`__ + - Config Key: `enabled` + - Values + - Type: `Boolean` + - Default: `false` + +- __`PLAYER_SIZE_SKYBLOCK_ONLY`__ + - Only change player sizes when playing Hypixel SkyBlock + - Config Key: `player-size-skyblock-only` + - Values + - Type: `Boolean` + - Default: `false` + +- __`PLAYER_SIZE`__ + - The size of your player + - Config Key: `player-size` + - Values + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.5F` + - Maximum: `1.0F` + +- __`OTHER_PLAYER_SIZE`__ + - The size of other players + - Config Key: `other-player-size` + - Values + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.5F` + - Maximum: `1.0F` + +- __`CHANGE_NPC_SIZE`__ + - If the size of NPCs should be changed + - Config Key: `change-npc-size` + - Values + - Type: `Boolean` + - Default: `false` + diff --git a/docs/developers/mods/momentum.mdx b/docs/developers/mods/momentum.mdx index 7b4dc3d7f..e7bc0b79a 100644 --- a/docs/developers/mods/momentum.mdx +++ b/docs/developers/mods/momentum.mdx @@ -26,10 +26,34 @@ public void toggleMomentumModExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`USE_GROUND_SPEED`__ + - If enabled then Y velocity is not used in the final speed. + - Config Key: `use-ground-speed` + - Values + - Type: `Boolean` + - Default: `false` + +- __`USE_AVERAGE_VELOCITY`__ + - If this is disabled then instant velocity is used + - Config Key: `use-average-velocity` + - Values + - Type: `Boolean` + - Default: `false` + +- __`AVERAGING_PERIOD`__ + - Determines how many times a second velocity is calculated. Lower values will show a smoother velocity + - Config Key: `averaging-period` + - Values + - Type: `Integer` + - Default: `8` + - Minimum: `1` + - Maximum: `50` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -115,26 +139,3 @@ public void toggleMomentumModExample(Player viewer, boolean value) { - Type: `String` - Default: `#FFFFFFFF` -- __`USE_GROUND_SPEED`__ - - If enabled then Y velocity is not used in the final speed. - - Config Key: `use-ground-speed` - - Values - - Type: `Boolean` - - Default: `false` - -- __`USE_AVERAGE_VELOCITY`__ - - If this is disabled then instant velocity is used - - Config Key: `use-average-velocity` - - Values - - Type: `Boolean` - - Default: `false` - -- __`AVERAGING_PERIOD`__ - - Determines how many times a second velocity is calculated. Lower values will show a smoother velocity - - Config Key: `averaging-period` - - Values - - Type: `Integer` - - Default: `8` - - Minimum: `1` - - Maximum: `50` - diff --git a/docs/developers/mods/nametag.mdx b/docs/developers/mods/nametag.mdx index b8dd0038c..ec4830db4 100644 --- a/docs/developers/mods/nametag.mdx +++ b/docs/developers/mods/nametag.mdx @@ -1,4 +1,4 @@ -# NameTags +# Nametags A mod that allows you to modify nametags. @@ -7,7 +7,7 @@ A mod that allows you to modify nametags. ### How to toggle the mod ```java -public void toggleNameTagsExample(Player viewer, boolean value) { +public void toggleNametagsExample(Player viewer, boolean value) { Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); apolloPlayerOpt.ifPresent(apolloPlayer -> this.modSettingModule.getOptions().set(apolloPlayer, ModNametag.ENABLED, value)); } @@ -41,6 +41,12 @@ public void toggleNameTagsExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `true` +- __`HIDE_NAMETAGS_IN_F1`__ + - Config Key: `hide-nametags-in-f1` + - Values + - Type: `Boolean` + - Default: `false` + - __`NAMETAG_BACKGROUND_OPACITY`__ - Config Key: `nametag-background-opacity` - Values @@ -49,3 +55,15 @@ public void toggleNameTagsExample(Player viewer, boolean value) { - Minimum: `0.0F` - Maximum: `1.0F` +- __`REPLACE_OWN_NAMETAG_COLOR`__ + - Config Key: `replace-own-nametag-color` + - Values + - Type: `Boolean` + - Default: `false` + +- __`OWN_NAMETAG_COLOR`__ + - Config Key: `own-nametag-color` + - Values + - Type: `String` + - Default: `#FFFFFFFF` + diff --git a/docs/developers/mods/packdisplay.mdx b/docs/developers/mods/packdisplay.mdx index 30217e2b1..4eea0bab6 100644 --- a/docs/developers/mods/packdisplay.mdx +++ b/docs/developers/mods/packdisplay.mdx @@ -26,8 +26,8 @@ public void togglePackDisplayExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`PACK_ICON`__ - Config Key: `pack-icon` @@ -54,6 +54,7 @@ public void togglePackDisplayExample(Player viewer, boolean value) { - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/playtime.mdx b/docs/developers/mods/playtime.mdx index 296926bce..968c46b27 100644 --- a/docs/developers/mods/playtime.mdx +++ b/docs/developers/mods/playtime.mdx @@ -26,10 +26,11 @@ public void togglePlaytimeExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/potioneffects.mdx b/docs/developers/mods/potioneffects.mdx index 26d68a17f..be3dca9cd 100644 --- a/docs/developers/mods/potioneffects.mdx +++ b/docs/developers/mods/potioneffects.mdx @@ -26,8 +26,8 @@ public void togglePotionEffectsExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`SHOW_IN_INVENTORY`__ - Config Key: `show-in-inventory` @@ -48,6 +48,7 @@ public void togglePotionEffectsExample(Player viewer, boolean value) { - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/radio.mdx b/docs/developers/mods/radio.mdx index 87d68f1ad..6ff1be94c 100644 --- a/docs/developers/mods/radio.mdx +++ b/docs/developers/mods/radio.mdx @@ -21,6 +21,14 @@ public void toggleRadioExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `true` +- __`SCALE`__ + - Config Key: `scale` + - Values + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.25F` + - Maximum: `5.0F` + - __`VOLUME`__ - Config Key: `volume` - Values @@ -35,13 +43,53 @@ public void toggleRadioExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `false` -- __`SCALE`__ - - Config Key: `scale` +- __`SHOW_COVER_ART`__ + - Config Key: `show-cover-art` - Values - - Type: `Float` - - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Type: `Boolean` + - Default: `true` + +- __`SHOW_PROGRESS`__ + - Config Key: `show-progress` + - Values + - Type: `Boolean` + - Default: `true` + +- __`SONG_SCROLL_ANIMATION`__ + - Config Key: `song-scroll-animation` + - Values + - Type: `Boolean` + - Default: `true` + +- __`SHOW_WHEN_NOTHING_PLAYING`__ + - Config Key: `show-when-nothing-playing` + - Values + - Type: `Boolean` + - Default: `false` + +- __`BOLD_ARIST_NAME`__ + - Config Key: `bold-arist-name` + - Values + - Type: `Boolean` + - Default: `false` + +- __`BOLD_SONG_NAME`__ + - Config Key: `bold-song-name` + - Values + - Type: `Boolean` + - Default: `true` + +- __`SHOW_DURATION`__ + - Config Key: `show-duration` + - Values + - Type: `Boolean` + - Default: `true` + +- __`SHOW_PLAY_BUTTON`__ + - Config Key: `show-play-button` + - Values + - Type: `Boolean` + - Default: `true` - __`BACKGROUND`__ - Config Key: `background` @@ -105,54 +153,6 @@ public void toggleRadioExample(Player viewer, boolean value) { - Type: `String` - Default: `#6F000000` -- __`SHOW_COVER_ART`__ - - Config Key: `show-cover-art` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SHOW_PROGRESS`__ - - Config Key: `show-progress` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SONG_SCROLL_ANIMATION`__ - - Config Key: `song-scroll-animation` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SHOW_WHEN_NOTHING_PLAYING`__ - - Config Key: `show-when-nothing-playing` - - Values - - Type: `Boolean` - - Default: `false` - -- __`BOLD_ARIST_NAME`__ - - Config Key: `bold-arist-name` - - Values - - Type: `Boolean` - - Default: `false` - -- __`BOLD_SONG_NAME`__ - - Config Key: `bold-song-name` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SHOW_DURATION`__ - - Config Key: `show-duration` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SHOW_PLAY_BUTTON`__ - - Config Key: `show-play-button` - - Values - - Type: `Boolean` - - Default: `true` - - __`SONG_NAME_TEXT_COLOR`__ - Config Key: `song-name-text-color` - Values diff --git a/docs/developers/mods/reachdisplay.mdx b/docs/developers/mods/reachdisplay.mdx index f018f52e5..58c234ec6 100644 --- a/docs/developers/mods/reachdisplay.mdx +++ b/docs/developers/mods/reachdisplay.mdx @@ -26,10 +26,11 @@ public void toggleReachDisplayExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/rewind.mdx b/docs/developers/mods/rewind.mdx new file mode 100644 index 000000000..285dd7972 --- /dev/null +++ b/docs/developers/mods/rewind.mdx @@ -0,0 +1,23 @@ +# Rewind + +Record your game sessions and rewind them from any perspective. + +## Integration + +### How to toggle the mod + +```java +public void toggleRewindExample(Player viewer, boolean value) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); + apolloPlayerOpt.ifPresent(apolloPlayer -> this.modSettingModule.getOptions().set(apolloPlayer, ModRewind.ENABLED, value)); +} +``` + +## Available options + +- __`ENABLED`__ + - Config Key: `enabled` + - Values + - Type: `Boolean` + - Default: `true` + diff --git a/docs/developers/mods/scoreboard.mdx b/docs/developers/mods/scoreboard.mdx index 6abbe3c68..2621df638 100644 --- a/docs/developers/mods/scoreboard.mdx +++ b/docs/developers/mods/scoreboard.mdx @@ -26,8 +26,8 @@ public void toggleScoreboardExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`NUMBERS`__ - Config Key: `numbers` @@ -42,6 +42,7 @@ public void toggleScoreboardExample(Player viewer, boolean value) { - Default: `false` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/scrollabletooltips.mdx b/docs/developers/mods/scrollabletooltips.mdx index bfe648013..d4ebea068 100644 --- a/docs/developers/mods/scrollabletooltips.mdx +++ b/docs/developers/mods/scrollabletooltips.mdx @@ -22,6 +22,7 @@ public void toggleScrollableTooltipsExample(Player viewer, boolean value) { - Default: `false` - __`START_AT_TOP`__ + - When a tooltip is sufficiently long, overflow off the bottom/right of the screen instead of the top/left. - Config Key: `start-at-top` - Values - Type: `Boolean` @@ -33,14 +34,17 @@ public void toggleScrollableTooltipsExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `false` -- __`TEXT_SHADOW`__ - - Config Key: `text-shadow` +- __`TOOLTIP_SCALE`__ + - Config Key: `tooltip-scale` - Values - - Type: `Boolean` - - Default: `true` - -- __`WRAP_TEXT`__ - - Config Key: `wrap-text` + - Type: `Float` + - Default: `1.0F` + - Minimum: `0.25F` + - Maximum: `2.5F` + +- __`TOOLTIP_FREE_SCROLL`__ + - Let the user scroll whenever they want, regardless of whether or not a tooltip is sufficiently large. + - Config Key: `tooltip-free-scroll` - Values - Type: `Boolean` - Default: `false` diff --git a/docs/developers/mods/serveraddress.mdx b/docs/developers/mods/serveraddress.mdx index 2b7c184f2..0aca6df6e 100644 --- a/docs/developers/mods/serveraddress.mdx +++ b/docs/developers/mods/serveraddress.mdx @@ -26,10 +26,17 @@ public void toggleServerAddressExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`SERVER_ICON`__ + - Config Key: `server-icon` + - Values + - Type: `Boolean` + - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -115,9 +122,3 @@ public void toggleServerAddressExample(Player viewer, boolean value) { - Type: `String` - Default: `#FFFFFFFF` -- __`SERVER_ICON`__ - - Config Key: `server-icon` - - Values - - Type: `Boolean` - - Default: `true` - diff --git a/docs/developers/mods/skyblock.mdx b/docs/developers/mods/skyblock.mdx index c3c005743..024a1530e 100644 --- a/docs/developers/mods/skyblock.mdx +++ b/docs/developers/mods/skyblock.mdx @@ -29,115 +29,96 @@ public void toggleHypixelSkyblockExample(Player viewer, boolean value) { - Minimum: `0.2F` - Maximum: `2.5F` -- __`SKYBLOCK_HIDE_HUNGER`__ - - Config Key: `skyblock-hide-hunger` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SKYBLOCK_HIDE_ARMOR`__ - - Config Key: `skyblock-hide-armor` - - Values - - Type: `Boolean` - - Default: `true` - -- __`SKYBLOCK_HIDE_HEARTS`__ - - Config Key: `skyblock-hide-hearts` +- __`AUTO_COPY_RARE_DROPS`__ + - Automatically copies rare drops and pet drops to the clipboard. + - Config Key: `auto-copy-rare-drops` - Values - Type: `Boolean` - Default: `false` -- __`SKYBLOCK_HIDE_ABSORB`__ - - Config Key: `skyblock-hide-absorb` +- __`SKY_BLOCK_MIDDLE_CLICK_ITEMS`__ + - Replaces left clicks in menus with a middle click. Hold control to override. + - Config Key: `sky-block-middle-click-items` - Values - Type: `Boolean` - Default: `false` -- __`HIDE_MIDAS_STAFF`__ - - Config Key: `hide-midas-staff` +- __`SKY_BLOCK_CREATION_DATE`__ + - Shows the creation date of the item in the lore. + - Config Key: `sky-block-creation-date` - Values - Type: `Boolean` - Default: `false` -- __`HIDE_FALLING_BLOCKS`__ - - Config Key: `hide-falling-blocks` +- __`SKY_BLOCK_ITEM_ID`__ + - Shows the item's SkyBlock ID in the lore. + - Config Key: `sky-block-item-id` - Values - Type: `Boolean` - Default: `false` -- __`AUTO_COPY_RARE_DROPS`__ - - Automatically copies rare drops and pet drops to the clipboard. - - Config Key: `auto-copy-rare-drops` +- __`SKYBLOCK_BOW_REEQUIP`__ + - Config Key: `skyblock-bow-reequip` - Values - Type: `Boolean` - - Default: `false` + - Default: `true` -- __`ONLY_MOVERS_ON_SKYBLOCK`__ - - Hides the hud previews in the edit hud layout menu if you're not currently on SkyBlock. - - Config Key: `only-movers-on-skyblock` +- __`SKYBLOCK_HIDE_HUNGER`__ + - Config Key: `skyblock-hide-hunger` - Values - Type: `Boolean` - - Default: `false` + - Default: `true` -- __`GRIFFIN_BURROW_ESTIMATES`__ - - Provides QOL for the Diana mayor that helps the user quickly locate burrows. - - Config Key: `griffin-burrow-estimates` +- __`SKYBLOCK_HIDE_ARMOR`__ + - Config Key: `skyblock-hide-armor` - Values - Type: `Boolean` - - Default: `false` + - Default: `true` -- __`SKY_BLOCK_MIDDLE_CLICK_ITEMS`__ - - Replaces left clicks in menus with a middle click. Hold control to override. - - Config Key: `sky-block-middle-click-items` +- __`SKYBLOCK_HIDE_HEARTS`__ + - Config Key: `skyblock-hide-hearts` - Values - Type: `Boolean` - Default: `false` -- __`SKY_BLOCK_CREATION_DATE`__ - - Shows the creation date of the item in the lore. - - Config Key: `sky-block-creation-date` +- __`SKYBLOCK_HIDE_ABSORB`__ + - Config Key: `skyblock-hide-absorb` - Values - Type: `Boolean` - Default: `false` -- __`SKY_BLOCK_ITEM_ID`__ - - Shows the item's SkyBlock ID in the lore. - - Config Key: `sky-block-item-id` +- __`ONLY_MOVERS_ON_SKYBLOCK`__ + - Hides the hud previews in the edit hud layout menu if you're not currently on SkyBlock. + - Config Key: `only-movers-on-skyblock` - Values - Type: `Boolean` - Default: `false` -- __`HIGHLIGHT_END_NODES`__ - - Config Key: `highlight-end-nodes` +- __`SKYBLOCK_SUBJECT_COLOR`__ + - Config Key: `skyblock-subject-color` - Values - - Type: `Boolean` - - Default: `false` + - Type: `String` + - Default: `#FFFFAA00` -- __`HIGHLIGHT_GLOWING_MUSHROOMS`__ - - Config Key: `highlight-glowing-mushrooms` +- __`SKYBLOCK_SEPARATOR_COLOR`__ + - Config Key: `skyblock-separator-color` - Values - - Type: `Boolean` - - Default: `false` + - Type: `String` + - Default: `#FFFFFFFF` -- __`SB_MENU_CLICK_TO_COMMAND`__ - - Config Key: `sb-menu-click-to-command` +- __`SKYBLOCK_VALUE_COLOR`__ + - Config Key: `skyblock-value-color` - Values - - Type: `Boolean` - - Default: `true` + - Type: `String` + - Default: `#FFAAAAAA` -- __`SHOW_GIANT_HPAT_FEET`__ - - Makes Giant HP more visible by showing their HP at their feet. - - Config Key: `show-giant-h-p-at-feet` +- __`GRIFFIN_BURROW_ESTIMATES`__ + - Provides QOL for the Diana mayor that helps the user quickly locate burrows. + - Config Key: `griffin-burrow-estimates` - Values - Type: `Boolean` - Default: `false` -- __`SKYBLOCK_SECRETS_COLLECTED`__ - - Config Key: `skyblock-secrets-collected` - - Values - - Type: `Boolean` - - Default: `true` - - __`TALLER_CROPS`__ - Changes crop hitboxes with their 1.12+ variant. Only enabled on Hypixel or singleplayer. - Config Key: `taller-crops` @@ -145,6 +126,12 @@ public void toggleHypixelSkyblockExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `false` +- __`HIGHLIGHT_GLOWING_MUSHROOMS`__ + - Config Key: `highlight-glowing-mushrooms` + - Values + - Type: `Boolean` + - Default: `false` + - __`SKY_BLOCK_WISHING_COMPASS`__ - Config Key: `sky-block-wishing-compass` - Values @@ -245,6 +232,51 @@ public void toggleHypixelSkyblockExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `false` +- __`HIGHLIGHT_END_NODES`__ + - Config Key: `highlight-end-nodes` + - Values + - Type: `Boolean` + - Default: `false` + +- __`SHOW_GIANT_HPAT_FEET`__ + - Makes Giant HP more visible by showing their HP at their feet. + - Config Key: `show-giant-h-p-at-feet` + - Values + - Type: `Boolean` + - Default: `false` + +- __`SHOW_PROFESSOR_GUARDIAN_HP`__ + - Makes Professor's Guardians HP more visible. + - Config Key: `show-professor-guardian-h-p` + - Values + - Type: `Boolean` + - Default: `false` + +- __`SKYBLOCK_DUNGEON_QUALITY`__ + - Config Key: `skyblock-dungeon-quality` + - Values + - Type: `Boolean` + - Default: `false` + +- __`SKYBLOCK_SECRETS_COLLECTED`__ + - Config Key: `skyblock-secrets-collected` + - Values + - Type: `Boolean` + - Default: `true` + +- __`SKYBLOCK_HIDE_NON_STARRED`__ + - Config Key: `skyblock-hide-non-starred` + - Values + - Type: `Boolean` + - Default: `true` + +- __`SKYBLOCK_TERMINAL_SPLIT_TIMERS`__ + - Shows how long it takes to do each terminal stage in chat (and also Simon Says)! + - Config Key: `skyblock-terminal-split-timers` + - Values + - Type: `Boolean` + - Default: `true` + - __`SKYBLOCK_LINE_THICKNESS`__ - Provides a general line thickness option that applies to most features with box/line rendering. - Config Key: `skyblock-line-thickness` @@ -254,9 +286,28 @@ public void toggleHypixelSkyblockExample(Player viewer, boolean value) { - Minimum: `1.0F` - Maximum: `10.0F` +- __`HIDE_MIDAS_STAFF`__ + - Config Key: `hide-midas-staff` + - Values + - Type: `Boolean` + - Default: `false` + +- __`HIDE_FALLING_BLOCKS`__ + - Config Key: `hide-falling-blocks` + - Values + - Type: `Boolean` + - Default: `false` + - __`SKYBLOCK_USE_TICK_TIMERS`__ - Config Key: `skyblock-use-tick-timers` - Values - Type: `Boolean` - Default: `true` +- __`SB_MENU_CLICK_TO_COMMAND`__ + - Routes menu clicks to /sbmenu command in order to prevent sticky item. + - Config Key: `sb-menu-click-to-command` + - Values + - Type: `Boolean` + - Default: `true` + diff --git a/docs/developers/mods/stopwatch.mdx b/docs/developers/mods/stopwatch.mdx index d6a8edec2..1b403763e 100644 --- a/docs/developers/mods/stopwatch.mdx +++ b/docs/developers/mods/stopwatch.mdx @@ -26,10 +26,17 @@ public void toggleStopwatchExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` + +- __`RESET_EVERY_START`__ + - Config Key: `reset-every-start` + - Values + - Type: `Boolean` + - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` @@ -115,9 +122,3 @@ public void toggleStopwatchExample(Player viewer, boolean value) { - Type: `String` - Default: `#FFFFFFFF` -- __`RESET_EVERY_START`__ - - Config Key: `reset-every-start` - - Values - - Type: `Boolean` - - Default: `true` - diff --git a/docs/developers/mods/tab.mdx b/docs/developers/mods/tab.mdx index 610a3a1d9..a022f2aa8 100644 --- a/docs/developers/mods/tab.mdx +++ b/docs/developers/mods/tab.mdx @@ -28,36 +28,6 @@ public void toggleTabEditorExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `false` -- __`HEADER_COLOR`__ - - Config Key: `header-color` - - Values - - Type: `String` - - Default: `#80000000` - -- __`FOOTER_COLOR`__ - - Config Key: `footer-color` - - Values - - Type: `String` - - Default: `#80000000` - -- __`BACKGROUND_COLOR`__ - - Config Key: `background-color` - - Values - - Type: `String` - - Default: `#80000000` - -- __`PING_ROW`__ - - Config Key: `ping-row` - - Values - - Type: `Boolean` - - Default: `false` - -- __`ROWS_COLOR`__ - - Config Key: `rows-color` - - Values - - Type: `String` - - Default: `#20000000` - - __`DISABLE_HEADER`__ - Config Key: `disable-header` - Values @@ -89,6 +59,36 @@ public void toggleTabEditorExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `false` +- __`HEADER_COLOR`__ + - Config Key: `header-color` + - Values + - Type: `String` + - Default: `#80000000` + +- __`FOOTER_COLOR`__ + - Config Key: `footer-color` + - Values + - Type: `String` + - Default: `#80000000` + +- __`BACKGROUND_COLOR`__ + - Config Key: `background-color` + - Values + - Type: `String` + - Default: `#80000000` + +- __`PING_ROW`__ + - Config Key: `ping-row` + - Values + - Type: `Boolean` + - Default: `false` + +- __`ROWS_COLOR`__ + - Config Key: `rows-color` + - Values + - Type: `String` + - Default: `#20000000` + - __`HIGHLIGHT_OWN_NAME`__ - Config Key: `highlight-own-name` - Values @@ -107,6 +107,12 @@ public void toggleTabEditorExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `true` +- __`MOVE_SELF_TO_TOP`__ + - Config Key: `move-self-to-top` + - Values + - Type: `Boolean` + - Default: `false` + - __`HIDE_PING`__ - Config Key: `hide-ping` - Values diff --git a/docs/developers/mods/tiertagger.mdx b/docs/developers/mods/tiertagger.mdx index 5401ceb7d..2f1c889c0 100644 --- a/docs/developers/mods/tiertagger.mdx +++ b/docs/developers/mods/tiertagger.mdx @@ -57,3 +57,63 @@ public void toggleTierTaggerExample(Player viewer, boolean value) { - Type: `Boolean` - Default: `true` +- __`COLOR_HT1`__ + - Config Key: `color-h-t1` + - Values + - Type: `String` + - Default: `#FFFFCF4A` + +- __`COLOR_LT1`__ + - Config Key: `color-l-t1` + - Values + - Type: `String` + - Default: `#FFD5B355` + +- __`COLOR_HT2`__ + - Config Key: `color-h-t2` + - Values + - Type: `String` + - Default: `#FFA4B3C7` + +- __`COLOR_LT2`__ + - Config Key: `color-l-t2` + - Values + - Type: `String` + - Default: `#FF888D95` + +- __`COLOR_HT3`__ + - Config Key: `color-h-t3` + - Values + - Type: `String` + - Default: `#FFDD8849` + +- __`COLOR_LT3`__ + - Config Key: `color-l-t3` + - Values + - Type: `String` + - Default: `#FFB36830` + +- __`COLOR_HT4`__ + - Config Key: `color-h-t4` + - Values + - Type: `String` + - Default: `#FF655B79` + +- __`COLOR_LT4`__ + - Config Key: `color-l-t4` + - Values + - Type: `String` + - Default: `#FF655B79` + +- __`COLOR_HT5`__ + - Config Key: `color-h-t5` + - Values + - Type: `String` + - Default: `#FF655B79` + +- __`COLOR_LT5`__ + - Config Key: `color-l-t5` + - Values + - Type: `String` + - Default: `#FF655B79` + diff --git a/docs/developers/mods/tntcountdown.mdx b/docs/developers/mods/tntcountdown.mdx index 948671528..d0c14ec74 100644 --- a/docs/developers/mods/tntcountdown.mdx +++ b/docs/developers/mods/tntcountdown.mdx @@ -37,6 +37,7 @@ public void toggleTNTCountdownExample(Player viewer, boolean value) { - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/waila.mdx b/docs/developers/mods/waila.mdx index 973ebd17d..c1431cd55 100644 --- a/docs/developers/mods/waila.mdx +++ b/docs/developers/mods/waila.mdx @@ -26,8 +26,8 @@ public void toggleWAILAExample(Player viewer, boolean value) { - Values - Type: `Float` - Default: `1.0F` - - Minimum: `0.5F` - - Maximum: `1.5F` + - Minimum: `0.25F` + - Maximum: `5.0F` - __`ALWAYS_SHOW`__ - Config Key: `always-show` @@ -48,6 +48,7 @@ public void toggleWAILAExample(Player viewer, boolean value) { - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` diff --git a/docs/developers/mods/waypoints.mdx b/docs/developers/mods/waypoints.mdx index b4e0107e1..39a299a61 100644 --- a/docs/developers/mods/waypoints.mdx +++ b/docs/developers/mods/waypoints.mdx @@ -22,18 +22,21 @@ public void toggleWaypointsExample(Player viewer, boolean value) { - Default: `true` - __`ADD_WAYPOINTS_FROM_CHAT`__ + - Allows you to click coordinates in chat and create a new waypoint from them - Config Key: `add-waypoints-from-chat` - Values - Type: `Boolean` - Default: `true` - __`DEATH_WAYPOINT`__ + - Automatically create a waypoint when you die - Config Key: `death-waypoint` - Values - Type: `Boolean` - Default: `true` - __`LIMIT_DEATH_WAYPOINTS`__ + - Limit the amount of waypoints that can be created, removing the oldest one when going over the limit - Config Key: `limit-death-waypoints` - Values - Type: `Boolean` @@ -49,24 +52,28 @@ public void toggleWaypointsExample(Player viewer, boolean value) { - Maximum: `20` - __`WAYPOINT_BEAMS`__ + - Enables beams for waypoints in the world - Config Key: `waypoint-beams` - Values - Type: `Boolean` - Default: `true` - __`BOX_BORDER`__ + - Adds a box around the waypoint label in the world - Config Key: `box-border` - Values - Type: `Boolean` - Default: `true` - __`TEXT_SHADOW`__ + - Adds a shadow to text - Config Key: `text-shadow` - Values - Type: `Boolean` - Default: `false` - __`BOX_PADDING`__ + - Increase the size of the labels box - Config Key: `box-padding` - Values - Type: `Float` @@ -82,6 +89,7 @@ public void toggleWaypointsExample(Player viewer, boolean value) { - Default: `false` - __`LABEL_SCALE`__ + - Scale the box containing the waypoints name in the world - Config Key: `label-scale` - Values - Type: `Float` @@ -90,6 +98,7 @@ public void toggleWaypointsExample(Player viewer, boolean value) { - Maximum: `2.0F` - __`ICON_SCALE`__ + - Scale the box containing the waypoints icon in the world - Config Key: `icon-scale` - Values - Type: `Float` @@ -97,8 +106,31 @@ public void toggleWaypointsExample(Player viewer, boolean value) { - Minimum: `0.1F` - Maximum: `3.0F` +- __`HIGHLIGHT_WAYPOINT_BLOCK`__ + - Show an outline around the block the waypoint is positioned on + - Config Key: `highlight-waypoint-block` + - Values + - Type: `Boolean` + - Default: `true` + +- __`HIGHLIGHT_WAYPOINT_BLOCK_LINE_WIDTH`__ + - The width of the outline around the block being highlighted + - Config Key: `highlight-waypoint-block-line-width` + - Values + - Type: `Float` + - Default: `4.0F` + - Minimum: `1.5F` + - Maximum: `7.5F` + +- __`WAYPOINT_SHOW_DISTANCE`__ + - Show the distance of a waypoint in the world + - Config Key: `waypoint-show-distance` + - Values + - Type: `Boolean` + - Default: `true` + - __`ONLY_SHOW_WHEN_LOOKING_NEAR`__ - - Only show each waypoint when looking near then in the world + - Waypoints will only be displayed when your camera is facing towards their general direction - Config Key: `only-show-when-looking-near` - Values - Type: `Boolean` diff --git a/docs/developers/modules/_meta.json b/docs/developers/modules/_meta.json index 1ee0d74df..ca4cfe5f1 100644 --- a/docs/developers/modules/_meta.json +++ b/docs/developers/modules/_meta.json @@ -16,6 +16,7 @@ "nametag": "Nametag", "nickhider": "Nick Hider", "notification": "Notification", + "paynow": "Pay Now", "packetenrichment": "Packet Enrichment", "richpresence": "Rich Presence", "saturation": "Saturation", diff --git a/docs/developers/modules/modsetting.mdx b/docs/developers/modules/modsetting.mdx index d20f98feb..944034049 100644 --- a/docs/developers/modules/modsetting.mdx +++ b/docs/developers/modules/modsetting.mdx @@ -12,6 +12,7 @@ You can find all available mods and their options under the mods section. - Adds the ability to interact with Lunar Client mods. - Ability to enable/disable mods. - Ability to change, enable or disable mod settings within a mod. + - Ability to retrieve the current value of any mod and settings within a mod. ![Mod Settings Module Example](https://i.imgur.com/KJqpGfa.png#center) @@ -21,14 +22,76 @@ You can find all available mods and their options under the mods section. ## Integration -### Sample Code +### Setting Status API +The **Setting Status API** provides a simple way to retrieve the **current** value of any mod or any setting within a mod. + +**Retrieve the current value for options** + +```java +private final ModSettingModule modSettingModule = Apollo.getModuleManager().getModule(ModSettingModule.class); + +private void printOptionStatusExample(Player player) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(player.getUniqueId()); + apolloPlayerOpt.ifPresent(apolloPlayer -> { + // https://lunarclient.dev/apollo/developers/mods/waypoints#available-options + boolean waypointsEnabled = this.modSettingModule.getStatus(apolloPlayer, ModWaypoints.ENABLED); + + // https://lunarclient.dev/apollo/developers/mods/minimap#available-options + float minimapScale = this.modSettingModule.getStatus(apolloPlayer, ModMinimap.SCALE); + + // https://lunarclient.dev/apollo/developers/mods/fov#available-options + int fovDefaultFov = this.modSettingModule.getStatus(apolloPlayer, ModFov.DEFAULT_FOV); + + apolloPlayer.sendMessage(Component.text("Waypoints Enabled: ") + .append(Component.text(waypointsEnabled))); + + apolloPlayer.sendMessage(Component.text("Minimap Scale: ") + .append(Component.text(minimapScale))); + + apolloPlayer.sendMessage(Component.text("Fov Default Fov: ") + .append(Component.text(fovDefaultFov))); + }); +} +``` + +**Listening for Updates** + +Apollo fires the [ApolloUpdateModOptionEvent](/apollo/developers/events), whenever a Lunar Client Mod Option is updated. + +```java +import com.lunarclient.apollo.event.ApolloListener; +import com.lunarclient.apollo.event.EventBus; +import com.lunarclient.apollo.event.Listen; +import com.lunarclient.apollo.event.modsetting.ApolloUpdateModOptionEvent; +import java.util.Objects; +import net.kyori.adventure.text.Component; + +public class ApolloModStatusExample implements ApolloListener { + + public ApolloModStatusExample() { + EventBus.getBus().register(this); + } + + @Listen + private void onApolloUpdateModOption(ApolloUpdateModOptionEvent event) { + event.getPlayer().sendMessage(Component.text(event.getOption().getKey()) + .append(Component.text(" was updated to ")) + .append(Component.text(Objects.toString(event.getValue())))); + } + +} +``` + +### Setting Interception API +The **Setting Interception API** allows you to **override** the value of any mod option. + Explore each integration by cycling through each tab, to find the best fit for your requirements and needs. -### Disable Lighting Mod +**Disable Lighting Mod** ```java public void disableLightingModExample(Player viewer) { @@ -37,7 +100,7 @@ public void disableLightingModExample(Player viewer) { } ``` -### Reset Lighting Mod to it's default value +**Reset Lighting Mod to it's default value** ```java public void rollbackLightingModEnabledState(Player viewer) { @@ -47,7 +110,7 @@ public void rollbackLightingModEnabledState(Player viewer) { } ``` -### Broadcast Disable Lighting Mod the an entire server +**Broadcast Disable Lighting Mod the an entire server** ```java public void broadcastDisableLightingModExample(Player viewer) { diff --git a/docs/developers/modules/paynow.mdx b/docs/developers/modules/paynow.mdx new file mode 100644 index 000000000..55fb4b444 --- /dev/null +++ b/docs/developers/modules/paynow.mdx @@ -0,0 +1,135 @@ +import { Tab, Tabs } from 'nextra-theme-docs' +import { Callout } from 'nextra-theme-docs' + +# Pay Now Module + +## Overview + +The Pay Now module allows Lunar Client users to complete purchases directly within the game, providing a faster, more seamless checkout experience. + +**Overlay Mode** + +This mode displays the Pay Now checkout flow as an overlay on the Minecraft window, similar to opening an inventory. It provides the most seamless experience and is the preferred method. Overlay mode is only available on **Windows**. + +**Window Mode** + +As a fallback, and for **macOS** and **Linux** users, a separate window opens to display the Pay Now checkout flow. While not as seamless as overlay mode, this ensures compatibility across all operating systems. + +## Usage Guidelines + +To ensure a smooth user experience, servers must only open checkout windows from user-initiated actions. Examples include, but aren't limited to: + +**Allowed (User-Initiated Actions):** +- Clicking a link in chat +- Running a command +- Clicking a button in a GUI + +**Not Allowed (Automated/Intrusive Actions):** +- Triggering on login +- Automatically opening at set intervals (e.g., every 30 minutes) +- Automatically opening during flash sales, events, or other promotions without user interaction + +This feature is designed to enhance the user experience by providing a seamless checkout process, misuse of this module, such as creating a disruptive or intrusive purchase flow, will result in restricted access in the future. + +## Integration + +The only piece of information sent from the server to the client to trigger a checkout window is the **PayNow checkout token**. This unique identifier represents an in-progress checkout. + +If a player is not using Lunar Client, the same PayNow checkout can be used on the web at: `https://checkout.paynow.gg/?t=` + +**Example flow** +1. Create a checkout token using the PayNow API that includes the desired products in the basket. +2. If the player is using Lunar Client: Send an Apollo packet to open the checkout modal. +3. If the player is not using Lunar Client: Send a chat message with a PayNow payment link. + +**PayNow API** + +Checkout tokens are created via the [PayNow Checkout API](https://docs.paynow.gg/management/management-api/checkout). This API allows programmatic checkout creation and more. + +**Getting started with the PayNow API** + +🔗 [Documentation](https://docs.paynow.gg/getting-started/overview)
+ +**API Authentication** + +You’ll need your **API Key** from: [PayNow API Keys](https://guides.paynow.gg/integration/api-keys) + + + Never share these credentials with Lunar Client or external servers. They should only be used while communicating with PayNow. + + +### Sample Code +Explore each integration by cycling through each tab to find the best fit for your requirements and needs. + + + + + +**Display Pay Now Embedded Checkout** + +```java +public void displayPayNowEmbeddedCheckoutExample(Player viewer, String checkoutToken) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId()); + + if (!apolloPlayerOpt.isPresent()) { + viewer.sendMessage("Complete your purchase at https://checkout.paynow.gg/?t=" + checkoutToken); + return; + } + + ApolloPlayer apolloPlayer = apolloPlayerOpt.get(); + PayNowEmbeddedCheckoutSupport embeddedCheckoutSupport = apolloPlayer.getPayNowEmbeddedCheckoutSupport(); + + if (embeddedCheckoutSupport == PayNowEmbeddedCheckoutSupport.UNSUPPORTED) { + viewer.sendMessage("Complete your purchase at https://checkout.paynow.gg/?t=" + checkoutToken); + return; + } + + this.payNowModule.displayPayNowEmbeddedCheckout(apolloPlayer, checkoutToken); + + if (embeddedCheckoutSupport == PayNowEmbeddedCheckoutSupport.OVERLAY) { + viewer.sendMessage("Opening checkout as game overlay!"); + } else { + viewer.sendMessage("Opening checkout in an external window!"); + } +} +``` + + + + + +**Display Pay Now Embedded Checkout** + + + To detect embedded checkout support type visit [Apollo Serverbound packets](/apollo/developers/lightweight/protobuf/serverbound-packets) + + +```java +public void displayPayNowEmbeddedCheckoutExample(Player viewer, String checkoutToken) { + OpenPayNowEmbeddedCheckoutMessage message = OpenPayNowEmbeddedCheckoutMessage.newBuilder() + .setCheckoutToken(checkoutToken) + .build(); + + ProtobufPacketUtil.sendPacket(viewer, message); +} +``` + + + + + +**Display Pay Now Embedded Checkout** + +```java +public void displayPayNowEmbeddedCheckoutExample(Player viewer, String checkoutToken) { + JsonObject message = new JsonObject(); + message.addProperty("@type", "type.googleapis.com/lunarclient.apollo.paynow.v1.OpenPayNowEmbeddedCheckoutMessage"); + message.addProperty("checkout_token", checkoutToken); + + JsonPacketUtil.sendPacket(viewer, message); +} +``` + + + + diff --git a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java index a078c3718..08d1fa811 100644 --- a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java +++ b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java @@ -29,6 +29,7 @@ import com.lunarclient.apollo.example.api.debug.command.ApolloDebugCommand; import com.lunarclient.apollo.example.api.debug.impl.SpamPacketDebug; import com.lunarclient.apollo.example.api.listener.ApolloPlayerApiListener; +import com.lunarclient.apollo.example.api.mods.ModStatusCommand; import com.lunarclient.apollo.example.api.module.AutoTextHotkeyApiExample; import com.lunarclient.apollo.example.api.module.BeamApiExample; import com.lunarclient.apollo.example.api.module.BorderApiExample; @@ -44,6 +45,7 @@ import com.lunarclient.apollo.example.api.module.NametagApiExample; import com.lunarclient.apollo.example.api.module.NickHiderApiExample; import com.lunarclient.apollo.example.api.module.NotificationApiExample; +import com.lunarclient.apollo.example.api.module.PayNowApiExample; import com.lunarclient.apollo.example.api.module.RichPresenceApiExample; import com.lunarclient.apollo.example.api.module.ServerRuleApiExample; import com.lunarclient.apollo.example.api.module.StaffModApiExample; @@ -73,6 +75,7 @@ public void enable() { @Override public void registerCommands() { this.getCommand("apollodebug").setExecutor(new ApolloDebugCommand()); + this.getCommand("modstatus").setExecutor(new ModStatusCommand()); } @Override @@ -92,6 +95,7 @@ public void registerModuleExamples() { this.setNametagExample(new NametagApiExample()); this.setNickHiderExample(new NickHiderApiExample()); this.setNotificationExample(new NotificationApiExample()); + this.setPayNowExample(new PayNowApiExample()); this.setRichPresenceExample(new RichPresenceApiExample()); this.setServerRuleExample(new ServerRuleApiExample()); this.setStaffModExample(new StaffModApiExample()); diff --git a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/DebugManager.java b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/DebugManager.java index 5dc4208bc..44bc43985 100644 --- a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/DebugManager.java +++ b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/DebugManager.java @@ -24,7 +24,8 @@ package com.lunarclient.apollo.example.api.debug; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.api.debug.payload.PayloadListener; +import com.lunarclient.apollo.example.api.debug.impl.ModSettingsTest; +import com.lunarclient.apollo.example.api.debug.impl.PayloadTest; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -45,7 +46,8 @@ public DebugManager() { this.players = new HashMap<>(); - new PayloadListener(); + new ModSettingsTest(); + new PayloadTest(); Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } diff --git a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/impl/ModSettingsTest.java b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/impl/ModSettingsTest.java new file mode 100644 index 000000000..c7afb0f78 --- /dev/null +++ b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/impl/ModSettingsTest.java @@ -0,0 +1,184 @@ +/* + * 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.api.debug.impl; + +import com.lunarclient.apollo.Apollo; +import com.lunarclient.apollo.event.ApolloListener; +import com.lunarclient.apollo.event.EventBus; +import com.lunarclient.apollo.event.Listen; +import com.lunarclient.apollo.event.modsetting.ApolloUpdateModOptionEvent; +import com.lunarclient.apollo.event.player.ApolloPlayerHandshakeEvent; +import com.lunarclient.apollo.example.ApolloExamplePlugin; +import com.lunarclient.apollo.mods.impl.ModWaypoints; +import com.lunarclient.apollo.module.modsetting.ModSettingModule; +import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.player.ApolloPlayer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import java.util.function.Predicate; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.ToString; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import org.bukkit.Bukkit; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.scheduler.BukkitTask; + +public class ModSettingsTest implements Listener, ApolloListener { + + private static final Component PREFIX = Component.text("[Apollo] [ModSettingsTest] ", NamedTextColor.YELLOW); + private static final Component FAILURE = Component.text(" ❌ ", NamedTextColor.RED); + private static final Component SUCCESS = Component.text(" ✔ ", NamedTextColor.GREEN); + + private final ModSettingModule modSettingModule = Apollo.getModuleManager().getModule(ModSettingModule.class); + private final Map> changes = new HashMap<>(); + private final Map tasks = new HashMap<>(); + + public ModSettingsTest() { + EventBus.getBus().register(this); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); + } + + @EventHandler + private void onPlayerQuit(PlayerQuitEvent event) { + UUID uuid = event.getPlayer().getUniqueId(); + BukkitTask task = this.tasks.remove(uuid); + + if (task != null) { + task.cancel(); + } + + this.changes.remove(uuid); + } + + @Listen + private void onApolloPlayerHandshake(ApolloPlayerHandshakeEvent event) { + ApolloPlayer player = event.getPlayer(); + BukkitTask task = Bukkit.getScheduler().runTaskLater(ApolloExamplePlugin.getInstance(), () -> { + this.changeOptions(player); + this.checkOptions(player); + }, 20 * 3); + + this.tasks.put(player.getUniqueId(), task); + } + + private void checkOptions(ApolloPlayer player) { + BukkitTask task = Bukkit.getScheduler().runTaskLater(ApolloExamplePlugin.getInstance(), () -> { + List changes = this.changes.getOrDefault(player.getUniqueId(), new ArrayList<>()); + if (!changes.isEmpty()) { + Component message = PREFIX + .append(Component.text("Failed to receive ")) + .append(Component.text(changes.size(), NamedTextColor.RED)) + .append(Component.text(" option changes!", NamedTextColor.YELLOW)) + .append(FAILURE); + + player.sendMessage(message); + this.changes.remove(player.getUniqueId()); + } + }, 20 * 10); + + this.tasks.put(player.getUniqueId(), task); + } + + @Listen + private void onApolloUpdateModOption(ApolloUpdateModOptionEvent event) { + ApolloPlayer player = event.getPlayer(); + Option option = event.getOption(); + Object value = event.getValue(); + + List changes = this.changes.getOrDefault(player.getUniqueId(), new ArrayList<>()); + boolean removed = false; + + Predicate isEventOption = change -> change.getKey().equals(option.getKey()) + && (change.getValue() == null || Objects.equals(change.getValue(), value)); + + Iterator iterator = changes.iterator(); + while (iterator.hasNext()) { + OptionChange change = iterator.next(); + if (isEventOption.test(change)) { + Object statusApiValue = this.modSettingModule.getStatus(player, option); + + if (!Objects.equals(statusApiValue, value)) { + Component message = PREFIX + .append(Component.text("Status API returned wrong value \"")) + .append(Component.text(statusApiValue.toString())) + .append(Component.text("\", expected \"")) + .append(Component.text(value == null ? "null" : value.toString())) + .append(Component.text("\" for option \"")) + .append(Component.text(option.getKey())) + .append(Component.text("\"!")) + .append(FAILURE); + + player.sendMessage(message); + } + + iterator.remove(); + removed = true; + } + } + + if (removed && changes.isEmpty()) { + Component message = PREFIX + .append(Component.text("Mod Setting Module tests passed!")) + .append(SUCCESS); + + player.sendMessage(message); + } + + } + + private void changeOptions(ApolloPlayer player) { + this.changeOption(player, ModWaypoints.ENABLED, false); + this.changeOption(player, ModWaypoints.DEATH_WAYPOINT, false); + + this.changeOption(player, ModWaypoints.ENABLED, null); + this.changeOption(player, ModWaypoints.DEATH_WAYPOINT, null); + } + + private void changeOption(ApolloPlayer player, Option option, Object value) { + this.modSettingModule.getOptions().set(option, value); + + this.changes.computeIfAbsent(player.getUniqueId(), k -> new ArrayList<>()) + .add(new OptionChange(option.getKey(), value)); + } + + @Getter + @ToString + @RequiredArgsConstructor + private static class OptionChange { + + private final String key; + private final Object value; + + } + +} diff --git a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/payload/PayloadListener.java b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/impl/PayloadTest.java similarity index 95% rename from example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/payload/PayloadListener.java rename to example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/impl/PayloadTest.java index 18993c0b6..9726c21ab 100644 --- a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/payload/PayloadListener.java +++ b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/debug/impl/PayloadTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.debug.payload; +package com.lunarclient.apollo.example.api.debug.impl; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.event.ApolloListener; @@ -43,12 +43,12 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.scheduler.BukkitTask; -public class PayloadListener implements Listener, ApolloListener { +public class PayloadTest implements Listener, ApolloListener { private final Set handshakeUuids; private final Map tasks; - public PayloadListener() { + public PayloadTest() { this.handshakeUuids = new HashSet<>(); this.tasks = new HashMap<>(); diff --git a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/mods/ApolloModStatusExample.java b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/mods/ApolloModStatusExample.java new file mode 100644 index 000000000..7e01ba800 --- /dev/null +++ b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/mods/ApolloModStatusExample.java @@ -0,0 +1,97 @@ +/* + * 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.api.mods; + +import com.lunarclient.apollo.Apollo; +import com.lunarclient.apollo.event.ApolloListener; +import com.lunarclient.apollo.event.EventBus; +import com.lunarclient.apollo.event.Listen; +import com.lunarclient.apollo.event.modsetting.ApolloUpdateModOptionEvent; +import com.lunarclient.apollo.example.ApolloExamplePlugin; +import com.lunarclient.apollo.mods.impl.ModFov; +import com.lunarclient.apollo.mods.impl.ModMinimap; +import com.lunarclient.apollo.mods.impl.ModWaypoints; +import com.lunarclient.apollo.module.modsetting.ModSettingModule; +import com.lunarclient.apollo.player.ApolloPlayer; +import java.util.Objects; +import java.util.Optional; +import net.kyori.adventure.text.Component; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockPlaceEvent; + +public class ApolloModStatusExample implements ApolloListener, Listener { + + private final ModSettingModule modSettingModule = Apollo.getModuleManager().getModule(ModSettingModule.class); + + public ApolloModStatusExample(ApolloExamplePlugin plugin) { + EventBus.getBus().register(this); + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + @Listen + private void onApolloUpdateModOption(ApolloUpdateModOptionEvent event) { + event.getPlayer().sendMessage(Component.text(event.getOption().getKey()) + .append(Component.text(" was updated to ")) + .append(Component.text(Objects.toString(event.getValue())))); + } + + @EventHandler + private void onBlockPlace(BlockPlaceEvent event) { + Player player = event.getPlayer(); + + if (event.getBlock().getType() != Material.DIAMOND_BLOCK) { + return; + } + + this.printOptionStatusExample(player); + } + + private void printOptionStatusExample(Player player) { + Optional apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(player.getUniqueId()); + apolloPlayerOpt.ifPresent(apolloPlayer -> { + // https://lunarclient.dev/apollo/developers/mods/waypoints#available-options + boolean waypointsEnabled = this.modSettingModule.getStatus(apolloPlayer, ModWaypoints.ENABLED); + + // https://lunarclient.dev/apollo/developers/mods/minimap#available-options + float minimapScale = this.modSettingModule.getStatus(apolloPlayer, ModMinimap.SCALE); + + // https://lunarclient.dev/apollo/developers/mods/fov#available-options + int fovDefaultFov = this.modSettingModule.getStatus(apolloPlayer, ModFov.DEFAULT_FOV); + + apolloPlayer.sendMessage(Component.text("Waypoints Enabled: ") + .append(Component.text(waypointsEnabled))); + + apolloPlayer.sendMessage(Component.text("Minimap Scale: ") + .append(Component.text(minimapScale))); + + apolloPlayer.sendMessage(Component.text("Fov Default Fov: ") + .append(Component.text(fovDefaultFov))); + }); + } + +} diff --git a/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/mods/ModStatusCommand.java b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/mods/ModStatusCommand.java new file mode 100644 index 000000000..ea8885483 --- /dev/null +++ b/example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/mods/ModStatusCommand.java @@ -0,0 +1,105 @@ +/* + * 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.api.mods; + +import com.lunarclient.apollo.Apollo; +import com.lunarclient.apollo.ApolloManager; +import com.lunarclient.apollo.module.modsetting.ModSettingModule; +import com.lunarclient.apollo.option.Option; +import com.lunarclient.apollo.player.ApolloPlayer; +import java.util.Map; +import java.util.Optional; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + +public class ModStatusCommand implements CommandExecutor { + + private final ModSettingModule modSettingModule = Apollo.getModuleManager().getModule(ModSettingModule.class); + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { + if (args.length == 0) { + sender.sendMessage("/modstatus "); + sender.sendMessage("/modstatus