Skip to content

Commit

Permalink
Version - 1.1.5 (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNature authored Sep 5, 2024
1 parent acc0a5b commit 395dab3
Show file tree
Hide file tree
Showing 33 changed files with 440 additions and 81 deletions.
10 changes: 10 additions & 0 deletions api/src/main/java/com/lunarclient/apollo/mods/impl/ModBossbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ public final class ModBossbar {
.notifyClient()
.build();

/**
* No documentation available.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> RENDER_BOSS_TEXT = SimpleOption.<Boolean>builder()
.node("bossbar", "render-boss-text").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

/**
* No documentation available.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public final class ModHypixelMod {
*
* @since 1.0.0
*/
public static final SimpleOption<Boolean> HYPIXEL_AUTOCOMPLETE = SimpleOption.<Boolean>builder()
.node("hypixel-mod", "hypixel-autocomplete").type(TypeToken.get(Boolean.class))
public static final SimpleOption<Boolean> LEVEL_HEAD = SimpleOption.<Boolean>builder()
.node("hypixel-mod", "level-head").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

Expand All @@ -139,8 +139,8 @@ public final class ModHypixelMod {
*
* @since 1.0.0
*/
public static final SimpleOption<Boolean> LEVEL_HEAD = SimpleOption.<Boolean>builder()
.node("hypixel-mod", "level-head").type(TypeToken.get(Boolean.class))
public static final SimpleOption<Boolean> HYPIXEL_AUTOCOMPLETE = SimpleOption.<Boolean>builder()
.node("hypixel-mod", "hypixel-autocomplete").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ public final class ModScoreboard {
.notifyClient()
.build();

/**
* No documentation available.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> HIDE_SCOREBOARD = SimpleOption.<Boolean>builder()
.node("scoreboard", "hide-scoreboard").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

/**
* No documentation available.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,28 @@ public final class ModSkyblock {
.notifyClient()
.build();

/**
* Provides QOL for the Diana mayor that helps the user quickly locate burrows.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> GRIFFIN_BURROW_ESTIMATES = SimpleOption.<Boolean>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))
.notifyClient()
.build();

/**
* Makes Giant HP more visible by showing their HP at their feet.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> SHOW_GIANT_HPAT_FEET = SimpleOption.<Boolean>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))
.notifyClient()
.build();

/**
* Changes crop hitboxes with their 1.12+ variant. Only enabled on Hypixel or singleplayer.
*
Expand Down Expand Up @@ -246,6 +268,16 @@ public final class ModSkyblock {
.notifyClient()
.build();

/**
* No documentation available.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> SHOW_KUUDRA_HEALTH = SimpleOption.<Boolean>builder()
.node("skyblock", "show-kuudra-health").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

private ModSkyblock() {
}

Expand Down
21 changes: 21 additions & 0 deletions api/src/main/java/com/lunarclient/apollo/mods/impl/ModTitles.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ public final class ModTitles {
.notifyClient()
.build();

/**
* Show title of height limit display.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> SHOW_TITLE = SimpleOption.<Boolean>builder()
.comment("Show title of height limit display")
.node("titles", "show-title").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

/**
* No documentation available.
*
* @since 1.1.5
*/
public static final SimpleOption<Boolean> SHOW_SUBTITLE = SimpleOption.<Boolean>builder()
.node("titles", "show-subtitle").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

/**
* No documentation available.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public final class ModUhcOverlay {
*
* @since 1.0.0
*/
@Deprecated
public static final NumberOption<Float> GOLD_INGOT_SCALE = NumberOption.<Float>number()
.node("uhc-overlay", "gold-ingot-scale").type(TypeToken.get(Float.class))
.min(1.0F).max(5.0F)
Expand All @@ -60,6 +61,7 @@ public final class ModUhcOverlay {
*
* @since 1.0.0
*/
@Deprecated
public static final NumberOption<Float> GOLD_NUGGET_SCALE = NumberOption.<Float>number()
.node("uhc-overlay", "gold-nugget-scale").type(TypeToken.get(Float.class))
.min(1.0F).max(5.0F)
Expand All @@ -71,6 +73,7 @@ public final class ModUhcOverlay {
*
* @since 1.0.0
*/
@Deprecated
public static final NumberOption<Float> GOLD_ORE_SCALE = NumberOption.<Float>number()
.node("uhc-overlay", "gold-ore-scale").type(TypeToken.get(Float.class))
.min(1.0F).max(5.0F)
Expand All @@ -82,6 +85,7 @@ public final class ModUhcOverlay {
*
* @since 1.0.0
*/
@Deprecated
public static final NumberOption<Float> GOLD_APPLE_SCALE = NumberOption.<Float>number()
.node("uhc-overlay", "gold-apple-scale").type(TypeToken.get(Float.class))
.min(1.0F).max(5.0F)
Expand All @@ -93,6 +97,7 @@ public final class ModUhcOverlay {
*
* @since 1.0.0
*/
@Deprecated
public static final NumberOption<Float> SKULL_SCALE = NumberOption.<Float>number()
.node("uhc-overlay", "skull-scale").type(TypeToken.get(Float.class))
.min(1.0F).max(5.0F)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ public final class ModWaypoints {
.notifyClient()
.build();

/**
* Adds a waypoint if coordinates are clicked in chat.
*
* @since 1.0.0
*/
public static final SimpleOption<Boolean> ADD_FROM_CHAT = SimpleOption.<Boolean>builder()
.comment("Adds a waypoint if coordinates are clicked in chat.")
.node("waypoints", "add-from-chat").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

/**
* No documentation available.
*
Expand Down Expand Up @@ -150,6 +139,18 @@ public final class ModWaypoints {
.notifyClient()
.build();

/**
* Adds a waypoint if coordinates are clicked in chat.
*
* @since 1.0.0
*/
@Deprecated
public static final SimpleOption<Boolean> ADD_FROM_CHAT = SimpleOption.<Boolean>builder()
.comment("Adds a waypoint if coordinates are clicked in chat.")
.node("waypoints", "add-from-chat").type(TypeToken.get(Boolean.class))
.notifyClient()
.build();

private ModWaypoints() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.lunarclient.apollo.world.ApolloWorld;
import java.util.Optional;
import java.util.UUID;
import net.kyori.adventure.audience.ForwardingAudience;
import org.jetbrains.annotations.ApiStatus;

/**
Expand All @@ -38,7 +39,7 @@
* @since 1.0.0
*/
@ApiStatus.NonExtendable
public interface ApolloPlayer extends Recipients {
public interface ApolloPlayer extends Recipients, ForwardingAudience.Single {

/**
* Gets the players unique identifier.
Expand Down
2 changes: 1 addition & 1 deletion bukkit-example/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Apollo-Example
main: com.lunarclient.apollo.example.ApolloExamplePlugin
version: 1.1.4
version: 1.1.5
author: Moonsworth
depend: [ Apollo-Bukkit ]
api-version: 1.13
Expand Down
2 changes: 2 additions & 0 deletions bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ dependencies {

"baseAdventure4"(project(path = ":extra:apollo-extra-adventure4", configuration = "base"))
"adventure4"(project(path = ":extra:apollo-extra-adventure4", configuration = "dependency"))

"baseAdventure4"(libs.adventure.platform.bukkit)
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
import java.util.logging.Logger;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.plugin.messaging.Messenger;
Expand All @@ -100,12 +101,17 @@ public final class ApolloBukkitPlatform implements PlatformPlugin, ApolloPlatfor

@Getter private final Options options = new OptionsImpl(null);
@Getter private final JavaPlugin plugin;

@Getter private BukkitAudiences audiences;
private ApolloStats stats;

@Override
public void onEnable() {
ApolloBukkitPlatform.instance = this;

this.audiences = BukkitAudiences.create(this.plugin);
this.stats = new BukkitApolloStats();

ApolloManager.bootstrap(this);

new ApolloPlayerListener(this.plugin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
import java.util.UUID;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.audience.Audience;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

/**
* The Bukkit implementation of {@link ApolloPlayer}.
Expand Down Expand Up @@ -88,4 +90,8 @@ public void sendPacket(byte[] messages) {
this.player.sendPluginMessage(ApolloBukkitPlatform.getInstance().getPlugin(), ApolloManager.PLUGIN_MESSAGE_CHANNEL, messages);
}

@Override
public @NotNull Audience audience() {
return ApolloBukkitPlatform.getInstance().getAudiences().player(this.player);
}
}
2 changes: 1 addition & 1 deletion bukkit/src/platform-loader/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Apollo-Bukkit
main: com.lunarclient.apollo.loader.BukkitPlatformLoader
version: 1.1.4
version: 1.1.5
author: Moonsworth
api-version: 1.13
soft-depend: [LunarClient-API]
Expand Down
2 changes: 2 additions & 0 deletions bungee/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ dependencies {

"baseAdventure4"(project(path = ":extra:apollo-extra-adventure4", configuration = "base"))
"adventure4"(project(path = ":extra:apollo-extra-adventure4", configuration = "dependency"))

"baseAdventure4"(libs.adventure.platform.bungee)
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import java.util.logging.Logger;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.api.plugin.PluginManager;
Expand All @@ -89,12 +90,17 @@ public final class ApolloBungeePlatform implements PlatformPlugin, ApolloPlatfor

@Getter private final Options options = new OptionsImpl(null);
@Getter private final Plugin plugin;

@Getter private BungeeAudiences audiences;
private ApolloStats stats;

@Override
public void onEnable() {
ApolloBungeePlatform.instance = this;

this.audiences = BungeeAudiences.create(this.plugin);
this.stats = new BungeeApolloStats();

ApolloManager.bootstrap(this);

((ApolloModuleManagerImpl) Apollo.getModuleManager())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
*/
package com.lunarclient.apollo.wrapper;

import com.lunarclient.apollo.ApolloBungeePlatform;
import com.lunarclient.apollo.ApolloManager;
import com.lunarclient.apollo.player.AbstractApolloPlayer;
import com.lunarclient.apollo.player.ApolloPlayer;
import java.util.UUID;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.audience.Audience;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import org.jetbrains.annotations.NotNull;

/**
* The Bungee implementation of {@link ApolloPlayer}.
Expand Down Expand Up @@ -62,4 +65,8 @@ public void sendPacket(byte[] messages) {
this.player.sendData(ApolloManager.PLUGIN_MESSAGE_CHANNEL, messages);
}

@Override
public @NotNull Audience audience() {
return ApolloBungeePlatform.getInstance().getAudiences().player(this.player);
}
}
2 changes: 1 addition & 1 deletion bungee/src/platform-loader/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Apollo-Bungee
main: com.lunarclient.apollo.loader.BungeePlatformLoader
version: 1.1.4
version: 1.1.5
author: Moonsworth
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,16 @@ public Value wrapValue(Value.Builder valueBuilder, Type type, @Nullable Object c

return valueBuilder.setListValue(listBuilder.build()).build();
} else if (Color.class.isAssignableFrom(clazz)) {
return valueBuilder.setStringValue((String) current).build();
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() + "'!");
Expand Down
6 changes: 4 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Deploy apollo to the test server
set -e
./gradlew clean build
scp bukkit/build/libs/apollo-bukkit-1.1.4.jar [email protected]:/home/ubuntu/apollo/plugins/
scp bukkit-example/build/libs/apollo-bukkit-example-1.1.4.jar [email protected]:/home/ubuntu/apollo/plugins/
scp bukkit/build/libs/apollo-bukkit-1.1.5.jar [email protected]:/home/ubuntu/apollo/plugins/
scp bukkit-example/build/libs/apollo-bukkit-example-1.1.5.jar [email protected]:/home/ubuntu/apollo/plugins/
scp bukkit/build/libs/apollo-bukkit-1.1.5.jar [email protected]:/home/ubuntu/lctest/plugins/
scp bukkit-example/build/libs/apollo-bukkit-example-1.1.5.jar [email protected]:/home/ubuntu/lctest/plugins/
Loading

1 comment on commit 395dab3

@LunarClientBot
Copy link
Collaborator

@LunarClientBot LunarClientBot commented on 395dab3 Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📄 Documentation Deployment

Status:✅ Completed
Environment:production
URL:https://f3902e80.lunarclient-dev.pages.dev

Please sign in to comment.