Skip to content

Commit 8a7a235

Browse files
ItsNatureTrentinTheKidFxMorinLunarClientBot
authored
Version - 1.2.1 (#237)
* Deploy as 1.2.1-SNAPSHOT * Restructure platform modules (#236) * add a parent platform gradle module * add readme banner * Add a few gh badges * remove build tools --------- Co-authored-by: Trentin <25537885+TrentinTheKid@users.noreply.github.com> * Bump bungee to 1.21-R0.4 (#240) * Option: Add static enum builder method (#239) - Like the other option types * Sync LunarClient Mods & Options (#241) * Sync LunarClient Mods & Options * Update version tags to 1.2.1 --------- Co-authored-by: LunarClient Bot <lc-bot@moonsworth.com> * Feature - Mod Status API (#243) * Apollo Mod Status API * Remove mod options loading logic from auto gen * example: add mod status command * Receive mod status from the handshake packet * don't use WeakHashMap for options * Markdown docs * Fix hyperlinks * Move mod status API into ModSettingsModule * Option API improvements * Remove debug * add mod settings module tests * Make global options protected * Link mod available options in the mod status example * example: remove debug * Prepare for merge * Feature - PayNow Module (#244) * Add the pay now module # Conflicts: # common/src/main/java/com/lunarclient/apollo/player/ApolloPlayerManagerImpl.java # docs/developers/lightweight/protobuf/getting-started.mdx # gradle/libs.versions.toml * Fix import order * Update example message * Paynow docs * Dont deploy this branch * Bump to 1.2.1 (#245) --------- Co-authored-by: Trentin <25537885+TrentinTheKid@users.noreply.github.com> Co-authored-by: Fx Morin <28154542+FxMorin@users.noreply.github.com> Co-authored-by: LunarClient Bot <lc-bot@moonsworth.com>
1 parent 9dc9aec commit 8a7a235

File tree

250 files changed

+4813
-1046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+4813
-1046
lines changed

.github/README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
![](https://i.imgur.com/VdgyD5m.png)
2+
# Apollo
3+
[![Discord](https://img.shields.io/discord/1080556677004271666?logo=discord&label=discord)](https://lunarclient.dev/discord)
4+
[![Latest Release](https://img.shields.io/github/v/release/LunarClient/Apollo.svg)](https://github.com/LunarClient/Apollo/releases)
5+
[![License](https://img.shields.io/github/license/LunarClient/Apollo.svg)](https://github.com/LunarClient/Apollo/blob/master/license.txt)
6+
7+
Apollo is a powerful tool that allows developers to create custom integrations with Lunar Client.
8+
9+
**Resources**
10+
- [Documentation & Wiki](https://lunarclient.dev/apollo/introduction)
11+
- [Downloads](https://lunarclient.dev/apollo/downloads)
12+
- [Maven Repository](https://lunarclient.dev/maven-repository)
13+
14+
## Integration
15+
16+
### API Integration
17+
Use the **Apollo API** directly by depending on it from our [Maven repository](https://lunarclient.dev/maven-repository).
18+
This is the most straightforward way to create plugins and modules that communicate with Lunar Client.
19+
20+
See the [Waypoint module integration guide](https://lunarclient.dev/apollo/developers/modules/waypoint#integration) for a complete example.
21+
22+
### Lightweight Integration
23+
Our **Lightweight integration** allows you to use Apollo features **without running the Apollo plugin**.
24+
This is useful for developers who want Apollo functionality but prefer a more minimal approach.
25+
26+
There are two supported methods:
27+
- [Lightweight JSON](https://lunarclient.dev/apollo/developers/lightweight/json/getting-started)
28+
- [Lightweight Protobuf](https://lunarclient.dev/apollo/developers/lightweight/protobuf/getting-started)
29+
30+
Both approaches achieve the same goal, but with different trade-offs in terms of **complexity and flexibility**.
31+
32+
Read the [Lightweight introduction](https://lunarclient.dev/apollo/developers/lightweight/introduction) documentation to get started.
33+
34+
## Examples
35+
36+
Apollo includes example plugins to help you get started quickly.
37+
These are the **same projects used for the code examples in the official documentation** on [lunarclient.dev](https://lunarclient.dev/apollo/introduction/).
38+
39+
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.
40+
41+
### Bukkit
42+
- API example → `example/bukkit/api/build/libs`
43+
- Lightweight JSON example → `example/bukkit/json/build/libs`
44+
- Lightweight Protobuf example → `example/bukkit/protos/build/libs`
45+
46+
### Minestom
47+
- API example server → `example/minestom/api/build/libs`
48+
49+
## Building
50+
51+
Apollo uses [Gradle](https://gradle.org/) to handle dependencies and compile the project.
52+
53+
**Prerequisites**
54+
55+
- Java 8 JDK
56+
- Build Tools for Spigot 1.8.8
57+
58+
**Compiling**
59+
60+
Running the following will compile the Apollo source for Java 8.
61+
62+
```shell
63+
./gradlew build
64+
```
65+
66+
The compiled jars will be available in build/libs for each platform:
67+
68+
- Bukkit: `platform/bukkit/plugin/build/libs`
69+
- Folia: `platform/folia/build/libs`
70+
- Minestom: `platform/minestom/build/libs`
71+
- BungeeCord: `platform/bungee/build/libs`
72+
- Velocity: `platform/velocity/build/libs`
73+
74+
## Contributing
75+
76+
The Apollo project is split into several modules.
77+
78+
- **API** - The publicly available interface for developers wishing to create custom integrations with Lunar Client.
79+
- **Common** - The abstraction used by platform modules to reduce duplicate code and implement the protocol for Lunar Client.
80+
- **Bukkit, Folia, Minestom, BungeeCord, Velocity** - Are modules that implement the common module for each respective platform.
81+
82+
Contributions can be made to Apollo by creating a pull request for improvements or fixes. For new feature ideas please consider making a
83+
suggestion by creating an [issue](https://github.com/LunarClient/Apollo/issues) or joining our [discord](https://lunarclient.dev/discord).
84+
85+
## License
86+
87+
Apollo is licensed under the [MIT license](https://github.com/LunarClient/Apollo/blob/master/license.txt).

.github/workflows/deploy.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ jobs:
2626
distribution: "zulu"
2727
java-version: 8
2828

29-
- name: Setup BuildTools
30-
run: |
31-
mkdir ~/buildtools
32-
cd ~/buildtools
33-
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
34-
java -jar BuildTools.jar --rev 1.8.8
35-
3629
- name: Gradle Build
3730
run: ./gradlew build
3831

@@ -62,8 +55,8 @@ jobs:
6255
target_commitish: "${{ github.sha }}"
6356
generate_release_notes: true
6457
files: |
65-
bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar
66-
bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar
67-
velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar
68-
folia/build/libs/apollo-folia-${{ env.VERSION }}.jar
69-
minestom/build/libs/apollo-minestom-${{ env.VERSION }}.jar
58+
platform/bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar
59+
platform/bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar
60+
platform/velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar
61+
platform/folia/build/libs/apollo-folia-${{ env.VERSION }}.jar
62+
platform/minestom/build/libs/apollo-minestom-${{ env.VERSION }}.jar

README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

api/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dependencies {
2020

2121
"bukkit"(main.output)
2222
"bukkit"(libs.bukkit.api)
23-
"bukkit"(libs.bukkit)
2423

2524
"bungee"(main.output)
2625
"bungee"(libs.bungee)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* This file is part of Apollo, licensed under the MIT License.
3+
*
4+
* Copyright (c) 2023 Moonsworth
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
package com.lunarclient.apollo.event.modsetting;
25+
26+
import com.lunarclient.apollo.event.Event;
27+
import com.lunarclient.apollo.option.Option;
28+
import com.lunarclient.apollo.player.ApolloPlayer;
29+
import lombok.Value;
30+
import org.jetbrains.annotations.Nullable;
31+
32+
/**
33+
* Represents an event that is fired when an option is updated.
34+
*
35+
* @since 1.2.1
36+
*/
37+
@Value
38+
public class ApolloUpdateModOptionEvent implements Event {
39+
40+
/**
41+
* The {@link ApolloPlayer} that the option was updated for.
42+
*
43+
* @return the player
44+
* @since 1.2.1
45+
*/
46+
ApolloPlayer player;
47+
48+
/**
49+
* The {@link Option} that was updated.
50+
*
51+
* @return the option
52+
* @since 1.2.1
53+
*/
54+
Option<?, ?, ?> option;
55+
56+
/**
57+
* The new value of the option.
58+
*
59+
* @return the new value
60+
* @since 1.2.1
61+
*/
62+
@Nullable Object value;
63+
64+
}

api/src/main/java/com/lunarclient/apollo/event/player/ApolloPlayerHandshakeEvent.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.lunarclient.apollo.client.version.LunarClientVersion;
2828
import com.lunarclient.apollo.client.version.MinecraftVersion;
2929
import com.lunarclient.apollo.event.Event;
30+
import com.lunarclient.apollo.module.paynow.PayNowEmbeddedCheckoutSupport;
3031
import com.lunarclient.apollo.module.tebex.TebexEmbeddedCheckoutSupport;
3132
import com.lunarclient.apollo.player.ApolloPlayer;
3233
import java.util.List;
@@ -80,4 +81,12 @@ public class ApolloPlayerHandshakeEvent implements Event {
8081
*/
8182
TebexEmbeddedCheckoutSupport tebexEmbeddedCheckoutSupport;
8283

84+
/**
85+
* The {@link PayNowEmbeddedCheckoutSupport} type.
86+
*
87+
* @return the Pay Now checkout support type
88+
* @since 1.2.1
89+
*/
90+
PayNowEmbeddedCheckoutSupport payNowEmbeddedCheckoutSupport;
91+
8392
}

api/src/main/java/com/lunarclient/apollo/mods/Mods.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.lunarclient.apollo.mods.impl.Mod2dItems;
2727
import com.lunarclient.apollo.mods.impl.Mod3dSkins;
2828
import com.lunarclient.apollo.mods.impl.ModArmorstatus;
29+
import com.lunarclient.apollo.mods.impl.ModAudioSubtitles;
2930
import com.lunarclient.apollo.mods.impl.ModAutoTextActions;
3031
import com.lunarclient.apollo.mods.impl.ModAutoTextHotkey;
3132
import com.lunarclient.apollo.mods.impl.ModBlockOutline;
@@ -63,6 +64,7 @@
6364
import com.lunarclient.apollo.mods.impl.ModMemory;
6465
import com.lunarclient.apollo.mods.impl.ModMenuBlur;
6566
import com.lunarclient.apollo.mods.impl.ModMinimap;
67+
import com.lunarclient.apollo.mods.impl.ModMobSize;
6668
import com.lunarclient.apollo.mods.impl.ModMomentum;
6769
import com.lunarclient.apollo.mods.impl.ModMotionBlur;
6870
import com.lunarclient.apollo.mods.impl.ModMumbleLink;
@@ -81,6 +83,7 @@
8183
import com.lunarclient.apollo.mods.impl.ModRadio;
8284
import com.lunarclient.apollo.mods.impl.ModReachDisplay;
8385
import com.lunarclient.apollo.mods.impl.ModReplaymod;
86+
import com.lunarclient.apollo.mods.impl.ModRewind;
8487
import com.lunarclient.apollo.mods.impl.ModSaturation;
8588
import com.lunarclient.apollo.mods.impl.ModSba;
8689
import com.lunarclient.apollo.mods.impl.ModScoreboard;
@@ -202,8 +205,11 @@ public final class Mods {
202205
ModHurtCam.class,
203206
ModTierTagger.class,
204207
ModDamageTint.class,
208+
ModMobSize.class,
205209
ModSkyblock.class,
206210
ModHorseStats.class,
211+
ModRewind.class,
212+
ModAudioSubtitles.class,
207213
ModKillSounds.class,
208214
ModInventoryMod.class,
209215
ModRadio.class

api/src/main/java/com/lunarclient/apollo/mods/impl/Mod2dItems.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public final class Mod2dItems {
4040
*/
4141
public static final SimpleOption<Boolean> ENABLED = SimpleOption.<Boolean>builder()
4242
.node("2d-items", "enabled").type(TypeToken.get(Boolean.class))
43+
.defaultValue(false)
4344
.notifyClient()
4445
.build();
4546

0 commit comments

Comments
 (0)