Skip to content

Commit 8dc1fbf

Browse files
Docs - Improvements (#188)
* Update Combat#DISABLE_MISS_PENALTY comment * add callouts * fix lightweight player detection examples not matching --------- Co-authored-by: TrentinTheKid <[email protected]>
1 parent fcf6ecc commit 8dc1fbf

File tree

8 files changed

+30
-30
lines changed

8 files changed

+30
-30
lines changed

api/src/main/java/com/lunarclient/apollo/module/combat/CombatModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public final class CombatModule extends ApolloModule {
4343
* @since 1.0.4
4444
*/
4545
public static final SimpleOption<Boolean> DISABLE_MISS_PENALTY = Option.<Boolean>builder()
46-
.comment("Set to 'true' to disable the hit delay on 1.8, otherwise 'false'.")
46+
.comment("Set to 'true' to remove the miss penalty on all versions 1.8 and above, otherwise 'false'.")
4747
.node("disable-miss-penalty").type(TypeToken.get(Boolean.class))
4848
.defaultValue(false).notifyClient().build();
4949

bukkit-example/src/main/java/com/lunarclient/apollo/example/json/listeners/ApolloPlayerJsonListener.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@ private void onRegisterChannel(PlayerRegisterChannelEvent event) {
7272
return;
7373
}
7474

75-
this.onApolloRegister(event.getPlayer());
75+
Player player = event.getPlayer();
76+
JsonPacketUtil.enableModules(player);
77+
78+
// Sending the player's world name to the client is required for some modules
79+
JsonPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));
80+
81+
this.playersRunningApollo.add(player.getUniqueId());
82+
player.sendMessage("You are using LunarClient!");
7683
}
7784

7885
@EventHandler
@@ -94,14 +101,4 @@ private boolean isPlayerRunningApollo(Player player) {
94101
return this.playersRunningApollo.contains(player.getUniqueId());
95102
}
96103

97-
private void onApolloRegister(Player player) {
98-
JsonPacketUtil.enableModules(player);
99-
100-
// Sending the player's world name to the client is required for some modules
101-
JsonPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));
102-
103-
this.playersRunningApollo.add(player.getUniqueId());
104-
player.sendMessage("You are using LunarClient!");
105-
}
106-
107104
}

bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPlayerProtoListener.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,14 @@ private void onRegisterChannel(PlayerRegisterChannelEvent event) {
7171
return;
7272
}
7373

74-
this.onApolloRegister(event.getPlayer());
74+
Player player = event.getPlayer();
75+
ProtobufPacketUtil.enableModules(player);
76+
77+
// Sending the player's world name to the client is required for some modules
78+
ProtobufPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));
79+
80+
this.playersRunningApollo.add(player.getUniqueId());
81+
player.sendMessage("You are using LunarClient!");
7582
}
7683

7784
@EventHandler
@@ -92,14 +99,4 @@ private boolean isPlayerRunningApollo(Player player) {
9299
return this.playersRunningApollo.contains(player.getUniqueId());
93100
}
94101

95-
private void onApolloRegister(Player player) {
96-
ProtobufPacketUtil.enableModules(player);
97-
98-
// Sending the player's world name to the client is required for some modules
99-
ProtobufPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));
100-
101-
this.playersRunningApollo.add(player.getUniqueId());
102-
player.sendMessage("You are using LunarClient!");
103-
}
104-
105102
}

docs/developers/lightweight/json/player-detection.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class ApolloPlayerJsonListener implements Listener {
3737
return;
3838
}
3939

40+
Player player = event.getPlayer();
4041
JsonPacketUtil.enableModules(player);
4142

4243
// Sending the player's world name to the client is required for some modules

docs/developers/lightweight/protobuf/player-detection.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class ApolloPlayerProtoListener implements Listener {
2727
return;
2828
}
2929

30+
Player player = event.getPlayer();
3031
ProtobufPacketUtil.enableModules(player);
3132

3233
// Sending the player's world name to the client is required for some modules

docs/developers/modules/border.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tab, Tabs } from 'nextra-theme-docs'
2+
import { Callout } from 'nextra-theme-docs'
23

34
# Border Module
45

@@ -12,6 +13,10 @@ The border module not only enhances Minecraft's current world border system, but
1213
- Custom border colors can be provided.
1314
- Ability to generate and display multiple world borders at once.
1415

16+
<Callout type="info">
17+
This module is only supported for 1.7 to 1.12 versions of Lunar Client.
18+
</Callout>
19+
1520
## Integration
1621

1722
### Sample Code

docs/developers/modules/combat.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
import { Callout } from 'nextra-theme-docs'
2-
31
# Combat Module
42

53
## Overview
64

75
The combat module allows you to modify certain aspects of combat that are usually handled client-sided.
86

9-
* Adds the ability to disable the 1.8 miss penalty, commonly known as 'hit-delay'.
10-
11-
<Callout type="info">
12-
This is a bare bones module to add support for the legacy-API feature 'LEGACY_COMBAT'.
13-
</Callout>
7+
- Adds the ability to disable the miss penalty, on all versions 1.8 and above.
148

159
## Available options
1610

docs/developers/modules/glow.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tab, Tabs } from 'nextra-theme-docs'
2+
import { Callout } from 'nextra-theme-docs'
23

34
# Glow Module
45

@@ -10,6 +11,10 @@ The glow module allows you to take advantage of the vanilla Minecraft Glow Effec
1011
- Adds improvements to glow effect for Lunar Client users.
1112
- Customizable colors for the glow effect, different from the vanilla Minecraft colors.
1213

14+
<Callout type="Warning">
15+
In Version 1.12, Optifine's 'Fast Render' setting alters player rendering. This is expected behavior for Optifine.
16+
</Callout>
17+
1318
![Glow Module Example](https://i.imgur.com/Ra3r363.png#center)
1419

1520
<div style={{ textAlign: "center" }}>

0 commit comments

Comments
 (0)