Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -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).
17 changes: 5 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
53 changes: 0 additions & 53 deletions README.md

This file was deleted.

1 change: 0 additions & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {

"bukkit"(main.output)
"bukkit"(libs.bukkit.api)
"bukkit"(libs.bukkit)

"bungee"(main.output)
"bungee"(libs.bungee)
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

}
6 changes: 6 additions & 0 deletions api/src/main/java/com/lunarclient/apollo/mods/Mods.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public final class Mod2dItems {
*/
public static final SimpleOption<Boolean> ENABLED = SimpleOption.<Boolean>builder()
.node("2d-items", "enabled").type(TypeToken.get(Boolean.class))
.defaultValue(false)
.notifyClient()
.build();

Expand Down
Loading