File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ import { Tab , Tabs } from ' nextra-theme-docs'
2+
13# Combat Module
24
35## Overview
@@ -6,6 +8,57 @@ The combat module allows you to modify certain aspects of combat that are usuall
68
79- Adds the ability to disable the miss penalty, on all versions 1.8 and above.
810
11+ ### Sample Code
12+ Explore each integration by cycling through each tab, to find the best fit for your requirements and needs.
13+
14+ <Tabs items = { [' Apollo API' , ' apollo-protos library' , ' Manual JSON Object Construction' ]} >
15+
16+ <Tab >
17+
18+ ### Toggle Miss Penalty
19+
20+ ``` java
21+ public void setDisableMissPenalty(boolean value) {
22+ this . combatModule. getOptions(). set(CombatModule . DISABLE_MISS_PENALTY , value);
23+ }
24+ ```
25+
26+ </Tab >
27+
28+ <Tab >
29+
30+ ### Toggle Miss Penalty
31+
32+ ``` java
33+ public void setDisableMissPenalty(boolean value) {
34+ Map<String , Value > properties = new HashMap<> ();
35+ properties. put(" disable-miss-penalty" , Value . newBuilder(). setBoolValue(value). build());
36+
37+ ConfigurableSettings settings = ProtobufPacketUtil . createModuleMessage(" combat" , properties);
38+ ProtobufPacketUtil . broadcastPacket(settings);
39+ }
40+ ```
41+
42+ </Tab >
43+
44+ <Tab >
45+
46+ ### Toggle Miss Penalty
47+
48+ ``` java
49+ public void setDisableMissPenalty(boolean value) {
50+ Map<String , Object > properties = new HashMap<> ();
51+ properties. put(" disable-miss-penalty" , value);
52+
53+ JsonObject message = JsonUtil . createEnableModuleObjectWithType(" combat" , properties);
54+ JsonPacketUtil . broadcastPacket(message);
55+ }
56+ ```
57+
58+ </Tab >
59+
60+ </Tabs >
61+
962## Available options
1063
1164- __ ` DISABLE_MISS_PENALTY ` __
You can’t perform that action at this time.
0 commit comments