Skip to content

Commit 5bfef74

Browse files
authored
Feature - NBT Apollo Modules (#195)
* Add Glint, Saturation & Inventory Apollo Modules * Disable Inventory Module by default
1 parent 0cd719c commit 5bfef74

File tree

4 files changed

+142
-0
lines changed

4 files changed

+142
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* This file is part of Apollo, licensed under the MIT License.
3+
*
4+
* Copyright (c) 2023 Moonsworth
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
package com.lunarclient.apollo.module.glint;
25+
26+
import com.lunarclient.apollo.module.ApolloModule;
27+
import com.lunarclient.apollo.module.ModuleDefinition;
28+
import org.jetbrains.annotations.ApiStatus;
29+
30+
/**
31+
* Represents the glint module.
32+
*
33+
* @since 1.1.7
34+
*/
35+
@ApiStatus.NonExtendable
36+
@ModuleDefinition(id = "glint", name = "Glint")
37+
public class GlintModule extends ApolloModule {
38+
39+
@Override
40+
public boolean isClientNotify() {
41+
return true;
42+
}
43+
44+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* This file is part of Apollo, licensed under the MIT License.
3+
*
4+
* Copyright (c) 2023 Moonsworth
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
package com.lunarclient.apollo.module.inventory;
25+
26+
import com.lunarclient.apollo.module.ApolloModule;
27+
import com.lunarclient.apollo.module.ModuleDefinition;
28+
import org.jetbrains.annotations.ApiStatus;
29+
30+
/**
31+
* Represents the inventory module.
32+
*
33+
* @since 1.1.7
34+
*/
35+
@ApiStatus.NonExtendable
36+
@ModuleDefinition(id = "inventory", name = "Inventory")
37+
public class InventoryModule extends ApolloModule {
38+
39+
protected InventoryModule() {
40+
this.registerOptions(ApolloModule.ENABLE_OPTION_OFF);
41+
}
42+
43+
@Override
44+
public boolean isClientNotify() {
45+
return true;
46+
}
47+
48+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* This file is part of Apollo, licensed under the MIT License.
3+
*
4+
* Copyright (c) 2023 Moonsworth
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
package com.lunarclient.apollo.module.saturation;
25+
26+
import com.lunarclient.apollo.module.ApolloModule;
27+
import com.lunarclient.apollo.module.ModuleDefinition;
28+
import org.jetbrains.annotations.ApiStatus;
29+
30+
/**
31+
* Represents the saturation module.
32+
*
33+
* @since 1.1.7
34+
*/
35+
@ApiStatus.NonExtendable
36+
@ModuleDefinition(id = "saturation", name = "Saturation")
37+
public class SaturationModule extends ApolloModule {
38+
39+
@Override
40+
public boolean isClientNotify() {
41+
return true;
42+
}
43+
44+
}

bukkit/src/main/java/com/lunarclient/apollo/ApolloBukkitPlatform.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@
4242
import com.lunarclient.apollo.module.cooldown.CooldownModuleImpl;
4343
import com.lunarclient.apollo.module.entity.EntityModule;
4444
import com.lunarclient.apollo.module.entity.EntityModuleImpl;
45+
import com.lunarclient.apollo.module.glint.GlintModule;
4546
import com.lunarclient.apollo.module.glow.GlowModule;
4647
import com.lunarclient.apollo.module.glow.GlowModuleImpl;
4748
import com.lunarclient.apollo.module.hologram.HologramModule;
4849
import com.lunarclient.apollo.module.hologram.HologramModuleImpl;
50+
import com.lunarclient.apollo.module.inventory.InventoryModule;
4951
import com.lunarclient.apollo.module.limb.LimbModule;
5052
import com.lunarclient.apollo.module.limb.LimbModuleImpl;
5153
import com.lunarclient.apollo.module.modsetting.ModSettingModule;
@@ -59,6 +61,7 @@
5961
import com.lunarclient.apollo.module.packetenrichment.PacketEnrichmentModule;
6062
import com.lunarclient.apollo.module.richpresence.RichPresenceModule;
6163
import com.lunarclient.apollo.module.richpresence.RichPresenceModuleImpl;
64+
import com.lunarclient.apollo.module.saturation.SaturationModule;
6265
import com.lunarclient.apollo.module.serverrule.ServerRuleModule;
6366
import com.lunarclient.apollo.module.staffmod.StaffModModule;
6467
import com.lunarclient.apollo.module.staffmod.StaffModModuleImpl;
@@ -127,15 +130,18 @@ public void onEnable() {
127130
.addModule(CombatModule.class)
128131
.addModule(CooldownModule.class, new CooldownModuleImpl())
129132
.addModule(EntityModule.class, new EntityModuleImpl())
133+
.addModule(GlintModule.class)
130134
.addModule(GlowModule.class, new GlowModuleImpl())
131135
.addModule(HologramModule.class, new HologramModuleImpl())
136+
.addModule(InventoryModule.class)
132137
.addModule(LimbModule.class, new LimbModuleImpl())
133138
.addModule(ModSettingModule.class)
134139
.addModule(NametagModule.class, new NametagModuleImpl())
135140
.addModule(NickHiderModule.class, new NickHiderModuleImpl())
136141
.addModule(NotificationModule.class, new NotificationModuleImpl())
137142
.addModule(PacketEnrichmentModule.class, new PacketEnrichmentImpl())
138143
.addModule(RichPresenceModule.class, new RichPresenceModuleImpl())
144+
.addModule(SaturationModule.class)
139145
.addModule(ServerRuleModule.class)
140146
.addModule(StaffModModule.class, new StaffModModuleImpl())
141147
.addModule(StopwatchModule.class, new StopwatchModuleImpl())

0 commit comments

Comments
 (0)