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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class ModOverlayMod {
*/
public static final SimpleOption<Boolean> ENABLED = SimpleOption.<Boolean>builder()
.node("overlay-mod", "enabled").type(TypeToken.get(Boolean.class))
.defaultValue(true)
.defaultValue(false)
.notifyClient()
.build();

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

/**
* No documentation available.
*
* @since 1.1.6
*/
public static final SimpleOption<Boolean> SKY_BLOCK_FINISHED_COMMISSIONS = SimpleOption.<Boolean>builder()
.node("skyblock", "sky-block-finished-commissions").type(TypeToken.get(Boolean.class))
.defaultValue(false)
.notifyClient()
.build();

/**
* No documentation available.
*
Expand All @@ -457,10 +468,10 @@ public final class ModSkyblock {
/**
* No documentation available.
*
* @since 1.1.6
* @since 1.2.4
*/
public static final SimpleOption<Boolean> SKY_BLOCK_FINISHED_COMMISSIONS = SimpleOption.<Boolean>builder()
.node("skyblock", "sky-block-finished-commissions").type(TypeToken.get(Boolean.class))
public static final SimpleOption<Boolean> SKY_BLOCK_METAL_DETECTOR_LINE = SimpleOption.<Boolean>builder()
.node("skyblock", "sky-block-metal-detector-line").type(TypeToken.get(Boolean.class))
.defaultValue(false)
.notifyClient()
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ public final class ModTierTagger {
*
* @since 1.1.9
*/
public static final SimpleOption<Boolean> SHOW_RETIRED = SimpleOption.<Boolean>builder()
.node("tier-tagger", "show-retired").type(TypeToken.get(Boolean.class))
.defaultValue(false)
public static final SimpleOption<Boolean> SHOW_REGION = SimpleOption.<Boolean>builder()
.node("tier-tagger", "show-region").type(TypeToken.get(Boolean.class))
.defaultValue(true)
.notifyClient()
.build();

Expand All @@ -105,9 +105,9 @@ public final class ModTierTagger {
*
* @since 1.1.9
*/
public static final SimpleOption<Boolean> SHOW_REGION = SimpleOption.<Boolean>builder()
.node("tier-tagger", "show-region").type(TypeToken.get(Boolean.class))
.defaultValue(true)
public static final SimpleOption<Boolean> SHOW_RETIRED = SimpleOption.<Boolean>builder()
.node("tier-tagger", "show-retired").type(TypeToken.get(Boolean.class))
.defaultValue(false)
.notifyClient()
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ public final class ServerRuleModule extends ApolloModule {
.node("max-chat-length").type(TypeToken.get(Integer.class))
.defaultValue(256).min(1).max(256).notifyClient().build();

/**
* Whether to enable crystal optimizer.
*
* @since 1.2.4
*/
public static final SimpleOption<Boolean> CRYSTAL_OPTIMIZER = Option.<Boolean>builder()
.comment("Set to 'true' to enable the crystal optimizer, otherwise 'false'.")
.node("crystal-optimizer").type(TypeToken.get(Boolean.class))
.defaultValue(false).notifyClient().build();

ServerRuleModule() {
this.registerOptions(
ServerRuleModule.COMPETITIVE_GAME,
Expand All @@ -178,7 +188,8 @@ public final class ServerRuleModule extends ApolloModule {
ServerRuleModule.OVERRIDE_NAMETAG_RENDER_DISTANCE,
ServerRuleModule.NAMETAG_RENDER_DISTANCE,
ServerRuleModule.OVERRIDE_MAX_CHAT_LENGTH,
ServerRuleModule.MAX_CHAT_LENGTH
ServerRuleModule.MAX_CHAT_LENGTH,
ServerRuleModule.CRYSTAL_OPTIMIZER
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -134,13 +135,21 @@ public <T extends ApiResponse> Future<T> request(ApiRequest<T> request) {
responseType.getTypeName(), response
)));
}
} catch (IOException e) {
ApolloHttpManager.handleError("Failed to parse request!", e, request);
} catch (IOException exception) {
if (exception instanceof UnknownHostException) {
return;
}

ApolloHttpManager.handleError("Failed to parse request!", exception, request);
} finally {
connection.disconnect();
}
} catch (Throwable t) {
ApolloHttpManager.handleError("Failed to open connection!", t, request);
} catch (Throwable throwable) {
if (throwable instanceof UnknownHostException) {
return;
}

ApolloHttpManager.handleError("Failed to open connection!", throwable, request);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public PacketEnrichmentImpl() {
private void onReceivePacket(ApolloReceivePacketEvent event) {
Options options = this.getOptions();

if (options.get(PacketEnrichmentModule.PLAYER_CHAT_OPEN_EVENT)) {
if (options.get(PacketEnrichmentModule.PLAYER_ATTACK_EVENT)) {
event.unpack(PlayerAttackMessage.class).ifPresent(packet -> {
ApolloPlayerAttackEvent playerAttackEvent = new ApolloPlayerAttackEvent(
event.getPlayer(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,14 @@ public ApolloVersionManager() {
* @since 1.0.0
*/
public void checkForUpdates() {
ApolloPlatform platform = Apollo.getPlatform();

if (!platform.getOptions().get(ApolloVersionManager.SEND_UPDATE_MESSAGE)) {
return;
}

ApolloManager.getHttpManager().request(VersionRequest.builder().build())
.onSuccess(response -> {
ApolloPlatform platform = Apollo.getPlatform();
String version = response.getVersion();

ApolloVersion currentVersion = new ApolloVersion(platform.getApolloVersion());
Expand All @@ -89,10 +94,6 @@ public void checkForUpdates() {

this.updateAssets = response;

if (!platform.getOptions().get(ApolloVersionManager.SEND_UPDATE_MESSAGE)) {
return;
}

Logger logger = platform.getPlatformLogger();
logger.warning(String.format("A new version of Apollo is available! Latest release: %s", version));

Expand Down
1 change: 1 addition & 0 deletions docs/developers/lightweight/json/packet-util.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static {
CONFIG_MODULE_PROPERTIES.put("server_rule", "nametag-render-distance", 64);
CONFIG_MODULE_PROPERTIES.put("server_rule", "override-max-chat-length", false);
CONFIG_MODULE_PROPERTIES.put("server_rule", "max-chat-length", 256);
CONFIG_MODULE_PROPERTIES.put("server_rule", "crystal-optimizer", false);
CONFIG_MODULE_PROPERTIES.put("tnt_countdown", "tnt-ticks", 80);
CONFIG_MODULE_PROPERTIES.put("title", "clear-title-on-server-switch", false);
CONFIG_MODULE_PROPERTIES.put("waypoint", "server-handles-waypoints", false);
Expand Down
1 change: 1 addition & 0 deletions docs/developers/lightweight/protobuf/packet-util.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static {
CONFIG_MODULE_PROPERTIES.put("server_rule", "nametag-render-distance", Value.newBuilder().setNumberValue(64).build());
CONFIG_MODULE_PROPERTIES.put("server_rule", "override-max-chat-length", Value.newBuilder().setBoolValue(false).build());
CONFIG_MODULE_PROPERTIES.put("server_rule", "max-chat-length", Value.newBuilder().setNumberValue(256).build());
CONFIG_MODULE_PROPERTIES.put("server_rule", "crystal-optimizer", Value.newBuilder().setBoolValue(false).build());
CONFIG_MODULE_PROPERTIES.put("tnt_countdown", "tnt-ticks", Value.newBuilder().setNumberValue(80).build());
CONFIG_MODULE_PROPERTIES.put("title", "clear-title-on-server-switch", Value.newBuilder().setBoolValue(false).build());
CONFIG_MODULE_PROPERTIES.put("waypoint", "server-handles-waypoints", Value.newBuilder().setBoolValue(false).build());
Expand Down
6 changes: 3 additions & 3 deletions docs/developers/minestom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ Next, add the `apollo-minestom` dependency to your project.
<Tab>
```kotlin filename="build.gradle.kts"
dependencies {
implementation("com.lunarclient:apollo-minestom:1.2.3")
implementation("com.lunarclient:apollo-minestom:1.2.4")
}
```
</Tab>
<Tab>
```groovy filename="build.gradle"
dependencies {
implementation 'com.lunarclient:apollo-minestom:1.2.3'
implementation 'com.lunarclient:apollo-minestom:1.2.4'
}
```
</Tab>
Expand All @@ -69,7 +69,7 @@ Next, add the `apollo-minestom` dependency to your project.
<dependency>
<groupId>com.lunarclient</groupId>
<artifactId>apollo-minestom</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/mods/overlaymod.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void toggleOverlayExample(Player viewer, boolean value) {
- Config Key: `enabled`
- Values
- Type: `Boolean`
- Default: `true`
- Default: `false`

- __`MINIMAL_VIEW_BOBBING`__
- When View Bobbing is enabled, only bob your hand (requires View Bobbing to be enabled).
Expand Down
10 changes: 8 additions & 2 deletions docs/developers/mods/skyblock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,20 @@ public void toggleHypixelSkyblockExample(Player viewer, boolean value) {
- Type: `Boolean`
- Default: `false`

- __`SKY_BLOCK_FINISHED_COMMISSIONS`__
- Config Key: `sky-block-finished-commissions`
- Values
- Type: `Boolean`
- Default: `false`

- __`SKY_BLOCK_METAL_DETECTOR`__
- Config Key: `sky-block-metal-detector`
- Values
- Type: `Boolean`
- Default: `false`

- __`SKY_BLOCK_FINISHED_COMMISSIONS`__
- Config Key: `sky-block-finished-commissions`
- __`SKY_BLOCK_METAL_DETECTOR_LINE`__
- Config Key: `sky-block-metal-detector-line`
- Values
- Type: `Boolean`
- Default: `false`
Expand Down
12 changes: 6 additions & 6 deletions docs/developers/mods/tiertagger.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ public void toggleTierTaggerExample(Player viewer, boolean value) {
- Type: `Boolean`
- Default: `true`

- __`SHOW_RETIRED`__
- Config Key: `show-retired`
- Values
- Type: `Boolean`
- Default: `false`

- __`SHOW_REGION`__
- Config Key: `show-region`
- Values
- Type: `Boolean`
- Default: `true`

- __`SHOW_RETIRED`__
- Config Key: `show-retired`
- Values
- Type: `Boolean`
- Default: `false`

- __`COLOR_HT1`__
- Config Key: `color-h-t1`
- Values
Expand Down
6 changes: 6 additions & 0 deletions docs/developers/modules/serverrule.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,9 @@ public void setNametagRenderDistanceExample(int value) {
- Default: `256`
- Minimum: `1`
- Maximum: `256`

- __`CRYSTAL_OPTIMIZER`__
- Whether to enable crystal optimizer.
- Values
- Type: `Boolean`
- Default: `false`
Loading
Loading