diff --git a/.checkstyle/suppressions.xml b/.checkstyle/suppressions.xml index 77286cb1..d13c7d9d 100644 --- a/.checkstyle/suppressions.xml +++ b/.checkstyle/suppressions.xml @@ -2,7 +2,7 @@ - + diff --git a/bukkit-example-api/build.gradle.kts b/bukkit-example-api/build.gradle.kts new file mode 100644 index 00000000..9386197b --- /dev/null +++ b/bukkit-example-api/build.gradle.kts @@ -0,0 +1,12 @@ +plugins { + id("apollo.base-conventions") + id("apollo.shadow-conventions") +} + +dependencies { + compileOnly(project(":extra:apollo-extra-adventure4")) + compileOnly(project(path = ":apollo-api", configuration = "bukkit")) + compileOnly(project(path = ":apollo-common", configuration = "shadow")) + + implementation(project(":apollo-bukkit-example-common")) +} diff --git a/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java new file mode 100644 index 00000000..50362c2a --- /dev/null +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/ApolloApiExamplePlatform.java @@ -0,0 +1,117 @@ +/* + * This file is part of Apollo, licensed under the MIT License. + * + * Copyright (c) 2023 Moonsworth + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.lunarclient.apollo.example.api; + +import com.lunarclient.apollo.example.ApolloExamplePlugin; +import com.lunarclient.apollo.example.ApolloExampleType; +import com.lunarclient.apollo.example.api.commands.debug.ApolloDebugCommand; +import com.lunarclient.apollo.example.api.debug.SpamPacketDebug; +import com.lunarclient.apollo.example.api.listener.ApolloPlayerApiListener; +import com.lunarclient.apollo.example.api.module.BeamApiExample; +import com.lunarclient.apollo.example.api.module.BorderApiExample; +import com.lunarclient.apollo.example.api.module.ChatApiExample; +import com.lunarclient.apollo.example.api.module.ColoredFireApiExample; +import com.lunarclient.apollo.example.api.module.CombatApiExample; +import com.lunarclient.apollo.example.api.module.CooldownApiExample; +import com.lunarclient.apollo.example.api.module.EntityApiExample; +import com.lunarclient.apollo.example.api.module.GlowApiExample; +import com.lunarclient.apollo.example.api.module.HologramApiExample; +import com.lunarclient.apollo.example.api.module.LimbApiExample; +import com.lunarclient.apollo.example.api.module.ModSettingsApiExample; +import com.lunarclient.apollo.example.api.module.NametagApiExample; +import com.lunarclient.apollo.example.api.module.NickHiderApiExample; +import com.lunarclient.apollo.example.api.module.NotificationApiExample; +import com.lunarclient.apollo.example.api.module.RichPresenceApiExample; +import com.lunarclient.apollo.example.api.module.ServerRuleApiExample; +import com.lunarclient.apollo.example.api.module.StaffModApiExample; +import com.lunarclient.apollo.example.api.module.StopwatchApiExample; +import com.lunarclient.apollo.example.api.module.TeamApiExample; +import com.lunarclient.apollo.example.api.module.TebexApiExample; +import com.lunarclient.apollo.example.api.module.TitleApiExample; +import com.lunarclient.apollo.example.api.module.TntCountdownApiExample; +import com.lunarclient.apollo.example.api.module.TransferApiExample; +import com.lunarclient.apollo.example.api.module.VignetteApiExample; +import com.lunarclient.apollo.example.api.module.WaypointApiExample; +import lombok.Getter; + +@Getter +public class ApolloApiExamplePlatform extends ApolloExamplePlugin { + + @Getter + private static ApolloApiExamplePlatform instance; + + private SpamPacketDebug spamPacketDebug; + + @Override + public void enable() { + instance = this; + } + + @Override + public void registerCommands() { + this.getCommand("apollodebug").setExecutor(new ApolloDebugCommand()); + } + + @Override + public void registerModuleExamples() { + this.setBeamExample(new BeamApiExample()); + this.setBorderExample(new BorderApiExample()); + this.setChatExample(new ChatApiExample()); + this.setColoredFireExample(new ColoredFireApiExample()); + this.setCombatExample(new CombatApiExample()); + this.setCooldownExample(new CooldownApiExample()); + this.setEntityExample(new EntityApiExample()); + this.setGlowExample(new GlowApiExample()); + this.setHologramExample(new HologramApiExample()); + this.setLimbExample(new LimbApiExample()); + this.setModSettingsExample(new ModSettingsApiExample()); + this.setNametagExample(new NametagApiExample()); + this.setNickHiderExample(new NickHiderApiExample()); + this.setNotificationExample(new NotificationApiExample()); + this.setRichPresenceExample(new RichPresenceApiExample()); + this.setServerRuleExample(new ServerRuleApiExample()); + this.setStaffModExample(new StaffModApiExample()); + this.setStopwatchExample(new StopwatchApiExample()); + this.setTeamExample(new TeamApiExample()); + this.setTebexExample(new TebexApiExample()); + this.setTitleExample(new TitleApiExample()); + this.setTntCountdownExample(new TntCountdownApiExample()); + this.setTransferExample(new TransferApiExample()); + this.setVignetteExample(new VignetteApiExample()); + this.setWaypointExample(new WaypointApiExample()); + } + + @Override + public void registerListeners() { + this.spamPacketDebug = new SpamPacketDebug(); + + new ApolloPlayerApiListener(this); + } + + @Override + public ApolloExampleType getType() { + return ApolloExampleType.API; + } + +} diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/debug/ApolloDebugCommand.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/commands/debug/ApolloDebugCommand.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/debug/ApolloDebugCommand.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/commands/debug/ApolloDebugCommand.java index 77373e72..513819ef 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/debug/ApolloDebugCommand.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/commands/debug/ApolloDebugCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.debug; +package com.lunarclient.apollo.example.api.commands.debug; import com.lunarclient.apollo.common.ApolloComponent; import net.kyori.adventure.text.Component; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/debug/SpamPacketsCommand.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/commands/debug/SpamPacketsCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/debug/SpamPacketsCommand.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/commands/debug/SpamPacketsCommand.java index 8c2379f9..3c63221d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/debug/SpamPacketsCommand.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/commands/debug/SpamPacketsCommand.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.debug; +package com.lunarclient.apollo.example.api.commands.debug; import com.lunarclient.apollo.common.ApolloComponent; -import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.debug.SpamPacketDebug; +import com.lunarclient.apollo.example.api.ApolloApiExamplePlatform; +import com.lunarclient.apollo.example.api.debug.SpamPacketDebug; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextDecoration; @@ -37,7 +37,7 @@ public class SpamPacketsCommand implements CommandExecutor { - private final SpamPacketDebug spamPacketDebug = ApolloExamplePlugin.getPlugin().getSpamPacketDebug(); + private final SpamPacketDebug spamPacketDebug = ApolloApiExamplePlatform.getInstance().getSpamPacketDebug(); @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/debug/SpamPacketDebug.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/debug/SpamPacketDebug.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/debug/SpamPacketDebug.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/debug/SpamPacketDebug.java index 5d9de7e2..5616a7f3 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/debug/SpamPacketDebug.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/debug/SpamPacketDebug.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.debug; +package com.lunarclient.apollo.example.api.debug; import com.google.common.collect.Maps; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.ApolloExamplePlugin; +import com.lunarclient.apollo.example.api.ApolloApiExamplePlatform; import com.lunarclient.apollo.network.NetworkOptions; import java.util.Map; import java.util.UUID; @@ -40,7 +40,7 @@ public class SpamPacketDebug implements Listener { private final Map players = Maps.newConcurrentMap(); public SpamPacketDebug() { - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloApiExamplePlatform.getInstance()); } @EventHandler diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/listeners/ApolloGeneralApiListener.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/general/ApolloEventListenerExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/listeners/ApolloGeneralApiListener.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/general/ApolloEventListenerExample.java index afe1c0c1..f3291270 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/listeners/ApolloGeneralApiListener.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/general/ApolloEventListenerExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.listeners; +package com.lunarclient.apollo.example.api.general; import com.lunarclient.apollo.event.ApolloListener; import com.lunarclient.apollo.event.Event; @@ -32,7 +32,7 @@ import com.lunarclient.apollo.player.ApolloPlayer; import org.bukkit.entity.Player; -public class ApolloGeneralApiListener { +public class ApolloEventListenerExample { // Method 1 public class GeneralExample1 implements ApolloListener { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/ApolloGeneralExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/general/ApolloGeneralExample.java similarity index 98% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/ApolloGeneralExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/general/ApolloGeneralExample.java index 1be6f101..8469de98 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/ApolloGeneralExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/general/ApolloGeneralExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api; +package com.lunarclient.apollo.example.api.general; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.module.border.BorderModule; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/listeners/ApolloPlayerApiListener.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/listener/ApolloPlayerApiListener.java similarity index 74% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/listeners/ApolloPlayerApiListener.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/listener/ApolloPlayerApiListener.java index 47e7bf04..53a89c20 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/listeners/ApolloPlayerApiListener.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/listener/ApolloPlayerApiListener.java @@ -21,25 +21,25 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.listeners; +package com.lunarclient.apollo.example.api.listener; import com.lunarclient.apollo.event.ApolloListener; import com.lunarclient.apollo.event.EventBus; import com.lunarclient.apollo.event.Listen; import com.lunarclient.apollo.event.player.ApolloRegisterPlayerEvent; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.api.examples.TeamApiExample; +import com.lunarclient.apollo.example.api.module.TeamApiExample; import com.lunarclient.apollo.player.ApolloPlayer; import org.bukkit.entity.Player; public class ApolloPlayerApiListener implements ApolloListener { - private final ApolloExamplePlugin plugin; + private final ApolloExamplePlugin example; private final TeamApiExample.Team defaultTeam; - public ApolloPlayerApiListener(ApolloExamplePlugin plugin) { - this.plugin = plugin; - this.defaultTeam = ((TeamApiExample) this.plugin.getTeamExample()).createTeam(); + public ApolloPlayerApiListener(ApolloExamplePlugin example) { + this.example = example; + this.defaultTeam = ((TeamApiExample) this.example.getTeamExample()).createTeam(); EventBus.getBus().register(this); } @@ -56,11 +56,11 @@ private void onApolloRegister(ApolloRegisterPlayerEvent event) { // Default team view markers this.defaultTeam.addMember(player); - this.plugin.getBeamExample().displayBeamExample(player); - this.plugin.getBorderExample().displayBorderExample(player); - this.plugin.getCooldownExample().displayCooldownItemExample(player); - this.plugin.getNametagExample().overrideNametagExample(player); - this.plugin.getWaypointExample().displayWaypointExample(player); + this.example.getBeamExample().displayBeamExample(player); + this.example.getBorderExample().displayBorderExample(player); + this.example.getCooldownExample().displayCooldownItemExample(player); + this.example.getNametagExample().overrideNametagExample(player); + this.example.getWaypointExample().displayWaypointExample(player); } } diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/BeamApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/BeamApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/BeamApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/BeamApiExample.java index c0abd96a..26ba3416 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/BeamApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/BeamApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.location.ApolloBlockLocation; -import com.lunarclient.apollo.example.common.modules.impl.BeamExample; +import com.lunarclient.apollo.example.module.impl.BeamExample; import com.lunarclient.apollo.module.beam.Beam; import com.lunarclient.apollo.module.beam.BeamModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/BorderApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/BorderApiExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/BorderApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/BorderApiExample.java index 1df60349..2bc7803e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/BorderApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/BorderApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.cuboid.Cuboid2D; -import com.lunarclient.apollo.example.common.modules.impl.BorderExample; +import com.lunarclient.apollo.example.module.impl.BorderExample; import com.lunarclient.apollo.module.border.Border; import com.lunarclient.apollo.module.border.BorderModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ChatApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ChatApiExample.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ChatApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ChatApiExample.java index 317d2826..d738474a 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ChatApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ChatApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ChatExample; +import com.lunarclient.apollo.example.module.impl.ChatExample; import com.lunarclient.apollo.module.chat.ChatModule; import com.lunarclient.apollo.recipients.Recipients; import net.kyori.adventure.text.Component; @@ -63,7 +63,7 @@ public void run() { } }; - runnable.runTaskTimer(ApolloExamplePlugin.getPlugin(), 0L, 20L); + runnable.runTaskTimer(ApolloExamplePlugin.getInstance(), 0L, 20L); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ColoredFireApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ColoredFireApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ColoredFireApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ColoredFireApiExample.java index bfc16dde..87437218 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ColoredFireApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ColoredFireApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.ColoredFireExample; +import com.lunarclient.apollo.example.module.impl.ColoredFireExample; import com.lunarclient.apollo.module.coloredfire.ColoredFireModule; import com.lunarclient.apollo.player.ApolloPlayer; import com.lunarclient.apollo.recipients.Recipients; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/CombatApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/CombatApiExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/CombatApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/CombatApiExample.java index 7d48b4ca..72623091 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/CombatApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/CombatApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.CombatExample; +import com.lunarclient.apollo.example.module.impl.CombatExample; import com.lunarclient.apollo.module.combat.CombatModule; public class CombatApiExample extends CombatExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/CooldownApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/CooldownApiExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/CooldownApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/CooldownApiExample.java index 9c44d982..a58aec78 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/CooldownApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/CooldownApiExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.icon.ItemStackIcon; import com.lunarclient.apollo.common.icon.SimpleResourceLocationIcon; -import com.lunarclient.apollo.example.common.modules.impl.CooldownExample; +import com.lunarclient.apollo.example.module.impl.CooldownExample; import com.lunarclient.apollo.module.cooldown.Cooldown; import com.lunarclient.apollo.module.cooldown.CooldownModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/EntityApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/EntityApiExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/EntityApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/EntityApiExample.java index 4b69d44b..682bc6ea 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/EntityApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/EntityApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.ApolloEntity; -import com.lunarclient.apollo.example.common.modules.impl.EntityExample; +import com.lunarclient.apollo.example.module.impl.EntityExample; import com.lunarclient.apollo.module.entity.EntityModule; import com.lunarclient.apollo.player.ApolloPlayer; import java.util.List; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/GlowApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/GlowApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/GlowApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/GlowApiExample.java index a42af2c3..77ce08b9 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/GlowApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/GlowApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.GlowExample; +import com.lunarclient.apollo.example.module.impl.GlowExample; import com.lunarclient.apollo.module.glow.GlowModule; import com.lunarclient.apollo.player.ApolloPlayer; import com.lunarclient.apollo.recipients.Recipients; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/HologramApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/HologramApiExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/HologramApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/HologramApiExample.java index fd71257f..9cb3ddd4 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/HologramApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/HologramApiExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.google.common.collect.Lists; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.location.ApolloLocation; -import com.lunarclient.apollo.example.common.modules.impl.HologramExample; +import com.lunarclient.apollo.example.module.impl.HologramExample; import com.lunarclient.apollo.module.hologram.Hologram; import com.lunarclient.apollo.module.hologram.HologramModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/LimbApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/LimbApiExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/LimbApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/LimbApiExample.java index a4704fda..b9a75504 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/LimbApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/LimbApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.LimbExample; +import com.lunarclient.apollo.example.module.impl.LimbExample; import com.lunarclient.apollo.module.limb.ArmorPiece; import com.lunarclient.apollo.module.limb.BodyPart; import com.lunarclient.apollo.module.limb.LimbModule; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ModSettingsApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ModSettingsApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ModSettingsApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ModSettingsApiExample.java index 9d4fbbdc..e9c5dc31 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ModSettingsApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ModSettingsApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.ModSettingsExample; +import com.lunarclient.apollo.example.module.impl.ModSettingsExample; import com.lunarclient.apollo.mods.impl.ModLighting; import com.lunarclient.apollo.module.modsetting.ModSettingModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NametagApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NametagApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NametagApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NametagApiExample.java index b6bcd544..f3ded5b8 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NametagApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NametagApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.google.common.collect.Lists; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.NametagExample; +import com.lunarclient.apollo.example.module.impl.NametagExample; import com.lunarclient.apollo.module.nametag.Nametag; import com.lunarclient.apollo.module.nametag.NametagModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NickHiderApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NickHiderApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NickHiderApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NickHiderApiExample.java index 30341d00..9f0ceeb8 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NickHiderApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NickHiderApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.NickHiderExample; +import com.lunarclient.apollo.example.module.impl.NickHiderExample; import com.lunarclient.apollo.module.nickhider.NickHiderModule; import com.lunarclient.apollo.player.ApolloPlayer; import java.util.Optional; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NotificationApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NotificationApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NotificationApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NotificationApiExample.java index 54ede6f2..dd172b5a 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/NotificationApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/NotificationApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.NotificationExample; +import com.lunarclient.apollo.example.module.impl.NotificationExample; import com.lunarclient.apollo.module.notification.Notification; import com.lunarclient.apollo.module.notification.NotificationModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/RichPresenceApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/RichPresenceApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/RichPresenceApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/RichPresenceApiExample.java index 53673969..819d37be 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/RichPresenceApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/RichPresenceApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.RichPresenceExample; +import com.lunarclient.apollo.example.module.impl.RichPresenceExample; import com.lunarclient.apollo.module.richpresence.RichPresenceModule; import com.lunarclient.apollo.module.richpresence.ServerRichPresence; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ServerRuleApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ServerRuleApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ServerRuleApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ServerRuleApiExample.java index 7f1e7a87..8658f41c 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/ServerRuleApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/ServerRuleApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.ServerRuleExample; +import com.lunarclient.apollo.example.module.impl.ServerRuleExample; import com.lunarclient.apollo.module.serverrule.ServerRuleModule; import com.lunarclient.apollo.player.ApolloPlayer; import java.util.Optional; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/StaffModApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/StaffModApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/StaffModApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/StaffModApiExample.java index 67db3782..11d6a833 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/StaffModApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/StaffModApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.StaffModExample; +import com.lunarclient.apollo.example.module.impl.StaffModExample; import com.lunarclient.apollo.module.staffmod.StaffMod; import com.lunarclient.apollo.module.staffmod.StaffModModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/StopwatchApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/StopwatchApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/StopwatchApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/StopwatchApiExample.java index 1a5bd858..5bcaf6fe 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/StopwatchApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/StopwatchApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.StopwatchExample; +import com.lunarclient.apollo.example.module.impl.StopwatchExample; import com.lunarclient.apollo.module.stopwatch.StopwatchModule; import com.lunarclient.apollo.player.ApolloPlayer; import java.util.Optional; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TeamApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TeamApiExample.java similarity index 98% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TeamApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TeamApiExample.java index 943099be..600a43a1 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TeamApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TeamApiExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.location.ApolloLocation; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TeamExample; +import com.lunarclient.apollo.example.module.impl.TeamExample; import com.lunarclient.apollo.module.team.TeamMember; import com.lunarclient.apollo.module.team.TeamModule; import java.awt.Color; @@ -58,7 +58,7 @@ public class TeamApiExample extends TeamExample implements Listener { public TeamApiExample() { new TeamUpdateTask(); - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @EventHandler @@ -179,7 +179,7 @@ public int hashCode() { public class TeamUpdateTask extends BukkitRunnable { public TeamUpdateTask() { - this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L); + this.runTaskTimerAsynchronously(ApolloExamplePlugin.getInstance(), 1L, 1L); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TebexApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TebexApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TebexApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TebexApiExample.java index c318a3e1..37695905 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TebexApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TebexApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.TebexExample; +import com.lunarclient.apollo.example.module.impl.TebexExample; import com.lunarclient.apollo.module.tebex.TebexEmbeddedCheckoutSupport; import com.lunarclient.apollo.module.tebex.TebexModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TitleApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TitleApiExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TitleApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TitleApiExample.java index e57bcff7..78e884c0 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TitleApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TitleApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.TitleExample; +import com.lunarclient.apollo.example.module.impl.TitleExample; import com.lunarclient.apollo.module.title.Title; import com.lunarclient.apollo.module.title.TitleModule; import com.lunarclient.apollo.module.title.TitleType; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TntCountdownApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TntCountdownApiExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TntCountdownApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TntCountdownApiExample.java index d2f8a609..1ee03cb6 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TntCountdownApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TntCountdownApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.ApolloEntity; -import com.lunarclient.apollo.example.common.modules.impl.TntCountdownExample; +import com.lunarclient.apollo.example.module.impl.TntCountdownExample; import com.lunarclient.apollo.module.tntcountdown.TntCountdownModule; import com.lunarclient.apollo.player.ApolloPlayer; import java.util.Optional; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TransferApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TransferApiExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TransferApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TransferApiExample.java index 252dc74d..8ac1fce1 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/TransferApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/TransferApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.google.common.collect.Lists; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.TransferExample; +import com.lunarclient.apollo.example.module.impl.TransferExample; import com.lunarclient.apollo.module.transfer.PingResponse; import com.lunarclient.apollo.module.transfer.TransferModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/VignetteApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/VignetteApiExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/VignetteApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/VignetteApiExample.java index 36c1edef..d914f323 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/VignetteApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/VignetteApiExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; -import com.lunarclient.apollo.example.common.modules.impl.VignetteExample; +import com.lunarclient.apollo.example.module.impl.VignetteExample; import com.lunarclient.apollo.module.vignette.Vignette; import com.lunarclient.apollo.module.vignette.VignetteModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/WaypointApiExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/WaypointApiExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/WaypointApiExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/WaypointApiExample.java index eb5b8e6a..f404c503 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/examples/WaypointApiExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/module/WaypointApiExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.examples; +package com.lunarclient.apollo.example.api.module; import com.lunarclient.apollo.Apollo; import com.lunarclient.apollo.common.location.ApolloBlockLocation; -import com.lunarclient.apollo.example.common.modules.impl.WaypointExample; +import com.lunarclient.apollo.example.module.impl.WaypointExample; import com.lunarclient.apollo.module.waypoint.Waypoint; import com.lunarclient.apollo.module.waypoint.WaypointModule; import com.lunarclient.apollo.player.ApolloPlayer; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/BukkitApolloExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/BukkitApolloExample.java similarity index 98% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/BukkitApolloExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/BukkitApolloExample.java index 12abb7b4..32f37478 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/BukkitApolloExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/BukkitApolloExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.utilities; +package com.lunarclient.apollo.example.api.util; import com.google.common.collect.Lists; import com.lunarclient.apollo.Apollo; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/ComponentExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/ComponentExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/ComponentExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/ComponentExample.java index f9bfc005..a401c88c 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/ComponentExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/ComponentExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.utilities; +package com.lunarclient.apollo.example.api.util; import com.google.common.collect.Lists; import net.kyori.adventure.text.Component; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/CuboidExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/CuboidExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/CuboidExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/CuboidExample.java index 241a27e6..fe1df4c1 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/CuboidExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/CuboidExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.utilities; +package com.lunarclient.apollo.example.api.util; import com.lunarclient.apollo.common.cuboid.Cuboid2D; import com.lunarclient.apollo.common.cuboid.Cuboid3D; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/IconExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/IconExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/IconExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/IconExample.java index f7bfe085..15596020 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/IconExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/IconExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.utilities; +package com.lunarclient.apollo.example.api.util; import com.lunarclient.apollo.common.icon.AdvancedResourceLocationIcon; import com.lunarclient.apollo.common.icon.ItemStackIcon; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/LocationExample.java b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/LocationExample.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/LocationExample.java rename to bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/LocationExample.java index f8d3486d..9a35bf92 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/api/utilities/LocationExample.java +++ b/bukkit-example-api/src/main/java/com/lunarclient/apollo/example/api/util/LocationExample.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.api.utilities; +package com.lunarclient.apollo.example.api.util; import com.lunarclient.apollo.common.location.ApolloBlockLocation; import com.lunarclient.apollo.common.location.ApolloLocation; diff --git a/bukkit-example/src/main/resources/plugin.yml b/bukkit-example-api/src/main/resources/plugin.yml similarity index 90% rename from bukkit-example/src/main/resources/plugin.yml rename to bukkit-example-api/src/main/resources/plugin.yml index a354a518..f733a25c 100644 --- a/bukkit-example/src/main/resources/plugin.yml +++ b/bukkit-example-api/src/main/resources/plugin.yml @@ -1,13 +1,13 @@ -name: Apollo-Example -main: com.lunarclient.apollo.example.ApolloExamplePlugin +name: Apollo-API-Example +main: com.lunarclient.apollo.example.api.ApolloApiExamplePlatform version: 1.1.7 author: Moonsworth softdepend: [ Apollo-Bukkit ] api-version: 1.13 commands: - switch: - description: "Switch the implementation type!" + apollodebug: + description: "Apollo Debug!" beam: description: "Beams!" border: @@ -64,5 +64,3 @@ commands: description: "Vignette!" waypoint: description: "Waypoints!" - apollodebug: - description: "Apollo Debug!" diff --git a/bukkit-example-common/build.gradle.kts b/bukkit-example-common/build.gradle.kts new file mode 100644 index 00000000..4b6b3fbb --- /dev/null +++ b/bukkit-example-common/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("apollo.base-conventions") + id("apollo.shadow-conventions") +} + +dependencies { + compileOnly(libs.bukkit) + compileOnly(libs.bukkit.api) +} diff --git a/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java new file mode 100644 index 00000000..ef2413b8 --- /dev/null +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java @@ -0,0 +1,194 @@ +/* + * This file is part of Apollo, licensed under the MIT License. + * + * Copyright (c) 2023 Moonsworth + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.lunarclient.apollo.example; + +import com.lunarclient.apollo.example.command.BeamCommand; +import com.lunarclient.apollo.example.command.BorderCommand; +import com.lunarclient.apollo.example.command.ChatCommand; +import com.lunarclient.apollo.example.command.ColoredFireCommand; +import com.lunarclient.apollo.example.command.CombatCommand; +import com.lunarclient.apollo.example.command.CooldownCommand; +import com.lunarclient.apollo.example.command.EntityCommand; +import com.lunarclient.apollo.example.command.GlintCommand; +import com.lunarclient.apollo.example.command.GlowCommand; +import com.lunarclient.apollo.example.command.HologramCommand; +import com.lunarclient.apollo.example.command.InventoryCommand; +import com.lunarclient.apollo.example.command.LimbCommand; +import com.lunarclient.apollo.example.command.ModSettingsCommand; +import com.lunarclient.apollo.example.command.NametagCommand; +import com.lunarclient.apollo.example.command.NickHiderCommand; +import com.lunarclient.apollo.example.command.NotificationCommand; +import com.lunarclient.apollo.example.command.RichPresenceCommand; +import com.lunarclient.apollo.example.command.SaturationCommand; +import com.lunarclient.apollo.example.command.ServerRuleCommand; +import com.lunarclient.apollo.example.command.StaffModCommand; +import com.lunarclient.apollo.example.command.StopwatchCommand; +import com.lunarclient.apollo.example.command.TeamCommand; +import com.lunarclient.apollo.example.command.TebexCommand; +import com.lunarclient.apollo.example.command.TitleCommand; +import com.lunarclient.apollo.example.command.TntCountdownCommand; +import com.lunarclient.apollo.example.command.TransferCommand; +import com.lunarclient.apollo.example.command.VignetteCommand; +import com.lunarclient.apollo.example.command.WaypointCommand; +import com.lunarclient.apollo.example.module.impl.BeamExample; +import com.lunarclient.apollo.example.module.impl.BorderExample; +import com.lunarclient.apollo.example.module.impl.ChatExample; +import com.lunarclient.apollo.example.module.impl.ColoredFireExample; +import com.lunarclient.apollo.example.module.impl.CombatExample; +import com.lunarclient.apollo.example.module.impl.CooldownExample; +import com.lunarclient.apollo.example.module.impl.EntityExample; +import com.lunarclient.apollo.example.module.impl.GlintExample; +import com.lunarclient.apollo.example.module.impl.GlowExample; +import com.lunarclient.apollo.example.module.impl.HologramExample; +import com.lunarclient.apollo.example.module.impl.InventoryExample; +import com.lunarclient.apollo.example.module.impl.LimbExample; +import com.lunarclient.apollo.example.module.impl.ModSettingsExample; +import com.lunarclient.apollo.example.module.impl.NametagExample; +import com.lunarclient.apollo.example.module.impl.NickHiderExample; +import com.lunarclient.apollo.example.module.impl.NotificationExample; +import com.lunarclient.apollo.example.module.impl.RichPresenceExample; +import com.lunarclient.apollo.example.module.impl.SaturationExample; +import com.lunarclient.apollo.example.module.impl.ServerRuleExample; +import com.lunarclient.apollo.example.module.impl.StaffModExample; +import com.lunarclient.apollo.example.module.impl.StopwatchExample; +import com.lunarclient.apollo.example.module.impl.TeamExample; +import com.lunarclient.apollo.example.module.impl.TebexExample; +import com.lunarclient.apollo.example.module.impl.TitleExample; +import com.lunarclient.apollo.example.module.impl.TntCountdownExample; +import com.lunarclient.apollo.example.module.impl.TransferExample; +import com.lunarclient.apollo.example.module.impl.VignetteExample; +import com.lunarclient.apollo.example.module.impl.WaypointExample; +import lombok.Getter; +import lombok.Setter; +import org.bukkit.plugin.java.JavaPlugin; + +@Getter @Setter +public abstract class ApolloExamplePlugin extends JavaPlugin { + + @Getter + private static ApolloExamplePlugin instance; + + private BeamExample beamExample; + private BorderExample borderExample; + private ChatExample chatExample; + private ColoredFireExample coloredFireExample; + private CombatExample combatExample; + private CooldownExample cooldownExample; + private EntityExample entityExample; + private GlintExample glintExample; + private GlowExample glowExample; + private HologramExample hologramExample; + private InventoryExample inventoryExample; + private LimbExample limbExample; + private ModSettingsExample modSettingsExample; + private NametagExample nametagExample; + private NickHiderExample nickHiderExample; + private NotificationExample notificationExample; + private RichPresenceExample richPresenceExample; + private SaturationExample saturationExample; + private ServerRuleExample serverRuleExample; + private StaffModExample staffModExample; + private StopwatchExample stopwatchExample; + private TeamExample teamExample; + private TebexExample tebexExample; + private TitleExample titleExample; + private TntCountdownExample tntCountdownExample; + private TransferExample transferExample; + private VignetteExample vignetteExample; + private WaypointExample waypointExample; + + @Override + public void onEnable() { + instance = this; + + this.registerCommonCommands(); + this.registerCommonModulesExamples(); + + this.enable(); + this.registerCommands(); + this.registerModuleExamples(); + this.registerListeners(); + } + + @Override + public void onDisable() { + + } + + private void registerCommonCommands() { + this.getCommand("beam").setExecutor(new BeamCommand()); + this.getCommand("border").setExecutor(new BorderCommand()); + this.getCommand("chat").setExecutor(new ChatCommand()); + this.getCommand("coloredfire").setExecutor(new ColoredFireCommand()); + this.getCommand("combat").setExecutor(new CombatCommand()); + this.getCommand("cooldown").setExecutor(new CooldownCommand()); + this.getCommand("entity").setExecutor(new EntityCommand()); + this.getCommand("glint").setExecutor(new GlintCommand()); + this.getCommand("glow").setExecutor(new GlowCommand()); + this.getCommand("hologram").setExecutor(new HologramCommand()); + this.getCommand("inventory").setExecutor(new InventoryCommand()); + this.getCommand("limb").setExecutor(new LimbCommand()); + this.getCommand("modsettings").setExecutor(new ModSettingsCommand()); + this.getCommand("nametag").setExecutor(new NametagCommand()); + this.getCommand("nickhider").setExecutor(new NickHiderCommand()); + this.getCommand("notification").setExecutor(new NotificationCommand()); + this.getCommand("richpresence").setExecutor(new RichPresenceCommand()); + this.getCommand("saturation").setExecutor(new SaturationCommand()); + this.getCommand("serverrule").setExecutor(new ServerRuleCommand()); + this.getCommand("staffmod").setExecutor(new StaffModCommand()); + this.getCommand("stopwatch").setExecutor(new StopwatchCommand()); + this.getCommand("team").setExecutor(new TeamCommand()); + this.getCommand("tebex").setExecutor(new TebexCommand()); + this.getCommand("title").setExecutor(new TitleCommand()); + this.getCommand("tntcountdown").setExecutor(new TntCountdownCommand()); + this.getCommand("transfer").setExecutor(new TransferCommand()); + this.getCommand("vignette").setExecutor(new VignetteCommand()); + this.getCommand("waypoint").setExecutor(new WaypointCommand()); + } + + private void registerCommonModulesExamples() { + this.glintExample = new GlintExample(); + this.inventoryExample = new InventoryExample(); + this.saturationExample = new SaturationExample(); + } + + public void enable() { + + } + + public void registerCommands() { + + } + + public void registerModuleExamples() { + + } + + public void registerListeners() { + + } + + public abstract ApolloExampleType getType(); + +} diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/ApolloExampleType.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/ApolloExampleType.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/ApolloExampleType.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/ApolloExampleType.java index 9eedd2e3..0e96b3fe 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/ApolloExampleType.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/ApolloExampleType.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules; +package com.lunarclient.apollo.example; public enum ApolloExampleType { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/BeamCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/BeamCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/BeamCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/BeamCommand.java index d070d7e2..3414d293 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/BeamCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/BeamCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.BeamExample; +import com.lunarclient.apollo.example.module.impl.BeamExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - BeamExample beamExample = ApolloExamplePlugin.getPlugin().getBeamExample(); + BeamExample beamExample = ApolloExamplePlugin.getInstance().getBeamExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/BorderCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/BorderCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/BorderCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/BorderCommand.java index da532482..1bfbfd28 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/BorderCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/BorderCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.BorderExample; +import com.lunarclient.apollo.example.module.impl.BorderExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - BorderExample borderExample = ApolloExamplePlugin.getPlugin().getBorderExample(); + BorderExample borderExample = ApolloExamplePlugin.getInstance().getBorderExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ChatCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ChatCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ChatCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ChatCommand.java index 6c0dff5d..e0c376c5 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ChatCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ChatCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ChatExample; +import com.lunarclient.apollo.example.module.impl.ChatExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - ChatExample chatExample = ApolloExamplePlugin.getPlugin().getChatExample(); + ChatExample chatExample = ApolloExamplePlugin.getInstance().getChatExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ColoredFireCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ColoredFireCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ColoredFireCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ColoredFireCommand.java index cd61c305..af983253 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ColoredFireCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ColoredFireCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ColoredFireExample; +import com.lunarclient.apollo.example.module.impl.ColoredFireExample; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -42,7 +42,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command } Player player = (Player) sender; - ColoredFireExample coloredFireExample = ApolloExamplePlugin.getPlugin().getColoredFireExample(); + ColoredFireExample coloredFireExample = ApolloExamplePlugin.getInstance().getColoredFireExample(); if (args.length == 1 && args[0].equalsIgnoreCase("clear")) { coloredFireExample.resetColoredFiresExample(player); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/CombatCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/CombatCommand.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/CombatCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/CombatCommand.java index b6f9e839..2a408685 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/CombatCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/CombatCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.CombatExample; +import com.lunarclient.apollo.example.module.impl.CombatExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - CombatExample combatExample = ApolloExamplePlugin.getPlugin().getCombatExample(); + CombatExample combatExample = ApolloExamplePlugin.getInstance().getCombatExample(); if (args[0].equalsIgnoreCase("disablemisspenalty")) { boolean value = Boolean.parseBoolean(args[1]); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/CooldownCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/CooldownCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/CooldownCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/CooldownCommand.java index 36535ee0..62de3bbb 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/CooldownCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/CooldownCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.CooldownExample; +import com.lunarclient.apollo.example.module.impl.CooldownExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - CooldownExample cooldownExample = ApolloExamplePlugin.getPlugin().getCooldownExample(); + CooldownExample cooldownExample = ApolloExamplePlugin.getInstance().getCooldownExample(); switch (args[0].toLowerCase()) { case "displayitem": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/EntityCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/EntityCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/EntityCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/EntityCommand.java index 64c0db1a..47a78bd8 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/EntityCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/EntityCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.EntityExample; +import com.lunarclient.apollo.example.module.impl.EntityExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - EntityExample entityExample = ApolloExamplePlugin.getPlugin().getEntityExample(); + EntityExample entityExample = ApolloExamplePlugin.getInstance().getEntityExample(); switch (args[0].toLowerCase()) { case "overridesheep": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/GlintCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/GlintCommand.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/GlintCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/GlintCommand.java index 8f0578dc..9ccb22ff 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/GlintCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/GlintCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.GlintExample; +import com.lunarclient.apollo.example.module.impl.GlintExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -41,7 +41,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command } Player player = (Player) sender; - GlintExample glintExample = ApolloExamplePlugin.getPlugin().getGlintExample(); + GlintExample glintExample = ApolloExamplePlugin.getInstance().getGlintExample(); if (glintExample.glintModuleExample(player)) { player.sendMessage("Giving items..."); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/GlowCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/GlowCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/GlowCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/GlowCommand.java index abff7295..0ca3fd3f 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/GlowCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/GlowCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.GlowExample; +import com.lunarclient.apollo.example.module.impl.GlowExample; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -42,7 +42,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command } Player player = (Player) sender; - GlowExample glowExample = ApolloExamplePlugin.getPlugin().getGlowExample(); + GlowExample glowExample = ApolloExamplePlugin.getInstance().getGlowExample(); if (args.length == 1 && args[0].equalsIgnoreCase("clear")) { glowExample.resetGlowEffectsExample(player); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/HologramCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/HologramCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/HologramCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/HologramCommand.java index 62c9dea6..583198af 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/HologramCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/HologramCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.HologramExample; +import com.lunarclient.apollo.example.module.impl.HologramExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - HologramExample hologramExample = ApolloExamplePlugin.getPlugin().getHologramExample(); + HologramExample hologramExample = ApolloExamplePlugin.getInstance().getHologramExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/InventoryCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/InventoryCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/InventoryCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/InventoryCommand.java index 2059a63d..4367bb92 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/InventoryCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/InventoryCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.InventoryExample; +import com.lunarclient.apollo.example.module.impl.InventoryExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -41,7 +41,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command } Player player = (Player) sender; - InventoryExample inventoryExample = ApolloExamplePlugin.getPlugin().getInventoryExample(); + InventoryExample inventoryExample = ApolloExamplePlugin.getInstance().getInventoryExample(); if (inventoryExample.inventoryModuleExample(player)) { player.sendMessage("Giving items..."); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/LimbCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/LimbCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/LimbCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/LimbCommand.java index 19df9cd8..8d9f8ac8 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/LimbCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/LimbCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.LimbExample; +import com.lunarclient.apollo.example.module.impl.LimbExample; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -55,7 +55,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - LimbExample limbExample = ApolloExamplePlugin.getPlugin().getLimbExample(); + LimbExample limbExample = ApolloExamplePlugin.getInstance().getLimbExample(); switch (args[0].toLowerCase()) { case "hidearmor": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ModSettingsCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ModSettingsCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ModSettingsCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ModSettingsCommand.java index 1346054d..0aac6178 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ModSettingsCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ModSettingsCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ModSettingsExample; +import com.lunarclient.apollo.example.module.impl.ModSettingsExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - ModSettingsExample modSettingsExample = ApolloExamplePlugin.getPlugin().getModSettingsExample(); + ModSettingsExample modSettingsExample = ApolloExamplePlugin.getInstance().getModSettingsExample(); switch (args[0].toLowerCase()) { case "disable": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NametagCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NametagCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NametagCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NametagCommand.java index a1443cd2..215c8756 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NametagCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NametagCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.NametagExample; +import com.lunarclient.apollo.example.module.impl.NametagExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - NametagExample nametagExample = ApolloExamplePlugin.getPlugin().getNametagExample(); + NametagExample nametagExample = ApolloExamplePlugin.getInstance().getNametagExample(); switch (args[0].toLowerCase()) { case "override": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NickHiderCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NickHiderCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NickHiderCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NickHiderCommand.java index 5e42f6a8..8a62e3ab 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NickHiderCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NickHiderCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.NickHiderExample; +import com.lunarclient.apollo.example.module.impl.NickHiderExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - NickHiderExample nickHiderExample = ApolloExamplePlugin.getPlugin().getNickHiderExample(); + NickHiderExample nickHiderExample = ApolloExamplePlugin.getInstance().getNickHiderExample(); switch (args[0].toLowerCase()) { case "override": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NotificationCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NotificationCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NotificationCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NotificationCommand.java index bb4eb8f4..b6f8342a 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/NotificationCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/NotificationCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.NotificationExample; +import com.lunarclient.apollo.example.module.impl.NotificationExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - NotificationExample notificationExample = ApolloExamplePlugin.getPlugin().getNotificationExample(); + NotificationExample notificationExample = ApolloExamplePlugin.getInstance().getNotificationExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/RichPresenceCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/RichPresenceCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/RichPresenceCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/RichPresenceCommand.java index 30b547e2..185cd868 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/RichPresenceCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/RichPresenceCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.RichPresenceExample; +import com.lunarclient.apollo.example.module.impl.RichPresenceExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - RichPresenceExample richPresenceExample = ApolloExamplePlugin.getPlugin().getRichPresenceExample(); + RichPresenceExample richPresenceExample = ApolloExamplePlugin.getInstance().getRichPresenceExample(); switch (args[0].toLowerCase()) { case "override": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/SaturationCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/SaturationCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/SaturationCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/SaturationCommand.java index f909a727..eb91e56a 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/SaturationCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/SaturationCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.SaturationExample; +import com.lunarclient.apollo.example.module.impl.SaturationExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -41,7 +41,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command } Player player = (Player) sender; - SaturationExample saturationExample = ApolloExamplePlugin.getPlugin().getSaturationExample(); + SaturationExample saturationExample = ApolloExamplePlugin.getInstance().getSaturationExample(); if (saturationExample.saturationModuleExample(player)) { player.sendMessage("Giving items..."); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ServerRuleCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ServerRuleCommand.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ServerRuleCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ServerRuleCommand.java index beac095e..4793914d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/ServerRuleCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/ServerRuleCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ServerRuleExample; +import com.lunarclient.apollo.example.module.impl.ServerRuleExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - ServerRuleExample serverRuleExample = ApolloExamplePlugin.getPlugin().getServerRuleExample(); + ServerRuleExample serverRuleExample = ApolloExamplePlugin.getInstance().getServerRuleExample(); switch (args[0].toLowerCase()) { case "antiportaltraps": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/StaffModCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/StaffModCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/StaffModCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/StaffModCommand.java index 2ffaf2bc..7ff3826b 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/StaffModCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/StaffModCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.StaffModExample; +import com.lunarclient.apollo.example.module.impl.StaffModExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - StaffModExample staffModExample = ApolloExamplePlugin.getPlugin().getStaffModExample(); + StaffModExample staffModExample = ApolloExamplePlugin.getInstance().getStaffModExample(); switch (args[0].toLowerCase()) { case "enable": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/StopwatchCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/StopwatchCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/StopwatchCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/StopwatchCommand.java index 86cb2c50..b4ef9a19 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/StopwatchCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/StopwatchCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.StopwatchExample; +import com.lunarclient.apollo.example.module.impl.StopwatchExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - StopwatchExample stopwatchExample = ApolloExamplePlugin.getPlugin().getStopwatchExample(); + StopwatchExample stopwatchExample = ApolloExamplePlugin.getInstance().getStopwatchExample(); switch (args[0].toLowerCase()) { case "start": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TeamCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TeamCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TeamCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TeamCommand.java index d62ad942..c8442182 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TeamCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TeamCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TeamExample; +import com.lunarclient.apollo.example.module.impl.TeamExample; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -42,7 +42,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command } Player player = (Player) sender; - TeamExample teamExample = ApolloExamplePlugin.getPlugin().getTeamExample(); + TeamExample teamExample = ApolloExamplePlugin.getInstance().getTeamExample(); if (args.length == 1) { switch (args[0].toLowerCase()) { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TebexCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TebexCommand.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TebexCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TebexCommand.java index c26d2d34..f517373b 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TebexCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TebexCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TebexExample; +import com.lunarclient.apollo.example.module.impl.TebexExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - TebexExample tebexExample = ApolloExamplePlugin.getPlugin().getTebexExample(); + TebexExample tebexExample = ApolloExamplePlugin.getInstance().getTebexExample(); String locale = args.length == 3 ? args[2] : null; switch (args[0].toLowerCase()) { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TitleCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TitleCommand.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TitleCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TitleCommand.java index f8f191df..fa6d2423 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TitleCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TitleCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TitleExample; +import com.lunarclient.apollo.example.module.impl.TitleExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - TitleExample titleExample = ApolloExamplePlugin.getPlugin().getTitleExample(); + TitleExample titleExample = ApolloExamplePlugin.getInstance().getTitleExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TntCountdownCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TntCountdownCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TntCountdownCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TntCountdownCommand.java index 67871040..1da2caed 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TntCountdownCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TntCountdownCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TntCountdownExample; +import com.lunarclient.apollo.example.module.impl.TntCountdownExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - TntCountdownExample tntCountdownExample = ApolloExamplePlugin.getPlugin().getTntCountdownExample(); + TntCountdownExample tntCountdownExample = ApolloExamplePlugin.getInstance().getTntCountdownExample(); switch (args[0].toLowerCase()) { case "override": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TransferCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TransferCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TransferCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TransferCommand.java index 1e316472..ae3ec760 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/TransferCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/TransferCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TransferExample; +import com.lunarclient.apollo.example.module.impl.TransferExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - TransferExample transferExample = ApolloExamplePlugin.getPlugin().getTransferExample(); + TransferExample transferExample = ApolloExamplePlugin.getInstance().getTransferExample(); switch (args[0].toLowerCase()) { case "transfer": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/VignetteCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/VignetteCommand.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/VignetteCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/VignetteCommand.java index b25fe357..4457ad42 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/VignetteCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/VignetteCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.VignetteExample; +import com.lunarclient.apollo.example.module.impl.VignetteExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - VignetteExample vignetteExample = ApolloExamplePlugin.getPlugin().getVignetteExample(); + VignetteExample vignetteExample = ApolloExamplePlugin.getInstance().getVignetteExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/WaypointCommand.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/WaypointCommand.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/WaypointCommand.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/WaypointCommand.java index af4942d6..729eaf43 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/module/WaypointCommand.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/command/WaypointCommand.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.commands.module; +package com.lunarclient.apollo.example.command; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.WaypointExample; +import com.lunarclient.apollo.example.module.impl.WaypointExample; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -47,7 +47,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command return true; } - WaypointExample waypointExample = ApolloExamplePlugin.getPlugin().getWaypointExample(); + WaypointExample waypointExample = ApolloExamplePlugin.getInstance().getWaypointExample(); switch (args[0].toLowerCase()) { case "display": { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/ApolloExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/ApolloModuleExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/ApolloExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/ApolloModuleExample.java index f69f6a5a..58bde882 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/ApolloExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/ApolloModuleExample.java @@ -21,17 +21,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules; +package com.lunarclient.apollo.example.module; import com.lunarclient.apollo.example.ApolloExamplePlugin; import org.bukkit.ChatColor; import org.bukkit.entity.Player; -public abstract class ApolloExample { +public abstract class ApolloModuleExample { protected void sendNotImplemented(Player player) { player.sendMessage(ChatColor.RED + "This command is not available with the " + - ApolloExamplePlugin.TYPE.name().toLowerCase() + " implementation!"); + ApolloExamplePlugin.getInstance().getType().name().toLowerCase() + " implementation!"); } } diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NMSExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/NMSExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NMSExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/NMSExample.java index ad11f51f..1e36a440 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NMSExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/NMSExample.java @@ -21,12 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module; -import com.lunarclient.apollo.example.common.modules.ApolloExample; import org.bukkit.Bukkit; -public class NMSExample extends ApolloExample { +public class NMSExample extends ApolloModuleExample { public boolean isOneEight() { return Bukkit.getServer().getClass() diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/BeamExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/BeamExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/BeamExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/BeamExample.java index 7dd40427..2327631e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/BeamExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/BeamExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class BeamExample extends ApolloExample { +public abstract class BeamExample extends ApolloModuleExample { public abstract void displayBeamExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/BorderExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/BorderExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/BorderExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/BorderExample.java index d24c606c..4df2cf60 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/BorderExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/BorderExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class BorderExample extends ApolloExample { +public abstract class BorderExample extends ApolloModuleExample { public abstract void displayBorderExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ChatExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ChatExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ChatExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ChatExample.java index 9108a1d5..1200200e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ChatExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ChatExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; -public abstract class ChatExample extends ApolloExample { +public abstract class ChatExample extends ApolloModuleExample { public abstract void displayLiveChatMessageExample(); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ColoredFireExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ColoredFireExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ColoredFireExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ColoredFireExample.java index 88d2a92b..d3463938 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ColoredFireExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ColoredFireExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import java.util.UUID; import org.bukkit.entity.Player; -public abstract class ColoredFireExample extends ApolloExample { +public abstract class ColoredFireExample extends ApolloModuleExample { public abstract void overrideColoredFireExample(UUID burningPlayer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/CombatExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/CombatExample.java similarity index 86% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/CombatExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/CombatExample.java index 4d3bfc50..8d1673e6 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/CombatExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/CombatExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; -public abstract class CombatExample extends ApolloExample { +public abstract class CombatExample extends ApolloModuleExample { public abstract void setDisableMissPenalty(boolean value); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/CooldownExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/CooldownExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/CooldownExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/CooldownExample.java index b68190ef..bf108776 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/CooldownExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/CooldownExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class CooldownExample extends ApolloExample { +public abstract class CooldownExample extends ApolloModuleExample { public abstract void displayCooldownItemExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/EntityExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/EntityExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/EntityExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/EntityExample.java index bfd12ce1..90ea7708 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/EntityExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/EntityExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class EntityExample extends ApolloExample { +public abstract class EntityExample extends ApolloModuleExample { public abstract void overrideRainbowSheepExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/GlintExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/GlintExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/GlintExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/GlintExample.java index 60a3a54a..12108c99 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/GlintExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/GlintExample.java @@ -21,9 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.ItemUtil; +import com.lunarclient.apollo.example.module.NMSExample; +import com.lunarclient.apollo.example.util.ItemUtil; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/GlowExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/GlowExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/GlowExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/GlowExample.java index d94bf83e..bbddc7c9 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/GlowExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/GlowExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import java.util.UUID; import org.bukkit.entity.Player; -public abstract class GlowExample extends ApolloExample { +public abstract class GlowExample extends ApolloModuleExample { public abstract void overrideGlowEffectExample(UUID glowingPlayer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/HologramExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/HologramExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/HologramExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/HologramExample.java index 47514208..7e69b408 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/HologramExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/HologramExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class HologramExample extends ApolloExample { +public abstract class HologramExample extends ApolloModuleExample { public abstract void displayHologramExample(); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/InventoryExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/InventoryExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java index fe447983..a1ea986f 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/InventoryExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/InventoryExample.java @@ -21,9 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.ItemUtil; +import com.lunarclient.apollo.example.module.NMSExample; +import com.lunarclient.apollo.example.util.ItemUtil; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/LimbExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/LimbExample.java similarity index 89% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/LimbExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/LimbExample.java index a7b1af2c..6bce7227 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/LimbExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/LimbExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class LimbExample extends ApolloExample { +public abstract class LimbExample extends ApolloModuleExample { public abstract void hideArmorExample(Player viewer, Player target); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ModSettingsExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ModSettingsExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ModSettingsExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ModSettingsExample.java index e5f39512..6121c57e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ModSettingsExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ModSettingsExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class ModSettingsExample extends ApolloExample { +public abstract class ModSettingsExample extends ApolloModuleExample { public abstract void disableLightingModExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NametagExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NametagExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NametagExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NametagExample.java index a1887109..02e27a40 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NametagExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NametagExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class NametagExample extends ApolloExample { +public abstract class NametagExample extends ApolloModuleExample { public abstract void overrideNametagExample(Player target); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NickHiderExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NickHiderExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NickHiderExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NickHiderExample.java index 1a5dbdb5..841fff8d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NickHiderExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NickHiderExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class NickHiderExample extends ApolloExample { +public abstract class NickHiderExample extends ApolloModuleExample { public abstract void overrideNickExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NotificationExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NotificationExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NotificationExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NotificationExample.java index 3cdb8937..b6ecef80 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/NotificationExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/NotificationExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class NotificationExample extends ApolloExample { +public abstract class NotificationExample extends ApolloModuleExample { public abstract void displayNotificationExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/RichPresenceExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/RichPresenceExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/RichPresenceExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/RichPresenceExample.java index 221b2a58..06f590c3 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/RichPresenceExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/RichPresenceExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class RichPresenceExample extends ApolloExample { +public abstract class RichPresenceExample extends ApolloModuleExample { public abstract void overrideServerRichPresenceExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/SaturationExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/SaturationExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/SaturationExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/SaturationExample.java index 4d0b5924..c7f61292 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/SaturationExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/SaturationExample.java @@ -21,9 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.ItemUtil; +import com.lunarclient.apollo.example.module.NMSExample; +import com.lunarclient.apollo.example.util.ItemUtil; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ServerRuleExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ServerRuleExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ServerRuleExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ServerRuleExample.java index a7ea8776..68c21446 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/ServerRuleExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/ServerRuleExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class ServerRuleExample extends ApolloExample { +public abstract class ServerRuleExample extends ApolloModuleExample { public abstract void setAntiPortalTraps(boolean value); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/StaffModExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/StaffModExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/StaffModExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/StaffModExample.java index 05c20f55..11400c7e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/StaffModExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/StaffModExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class StaffModExample extends ApolloExample { +public abstract class StaffModExample extends ApolloModuleExample { public abstract void enableStaffModsExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/StopwatchExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/StopwatchExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/StopwatchExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/StopwatchExample.java index 92417caa..66f0a65d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/StopwatchExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/StopwatchExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class StopwatchExample extends ApolloExample { +public abstract class StopwatchExample extends ApolloModuleExample { public abstract void startStopwatchExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TeamExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TeamExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TeamExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TeamExample.java index 3da27f9e..2398fc51 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TeamExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TeamExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class TeamExample extends ApolloExample { +public abstract class TeamExample extends ApolloModuleExample { public abstract void createTeam(Player player); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TebexExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TebexExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TebexExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TebexExample.java index ba23761e..054ba7f2 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TebexExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TebexExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class TebexExample extends ApolloExample { +public abstract class TebexExample extends ApolloModuleExample { public abstract void displayTebexEmbeddedCheckoutExample(Player viewer, String basketIdent, String locale); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TitleExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TitleExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TitleExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TitleExample.java index 063afd4b..48fdc134 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TitleExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TitleExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class TitleExample extends ApolloExample { +public abstract class TitleExample extends ApolloModuleExample { public abstract void displayTitleExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TntCountdownExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TntCountdownExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TntCountdownExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TntCountdownExample.java index 46796516..0243c61e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TntCountdownExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TntCountdownExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class TntCountdownExample extends ApolloExample { +public abstract class TntCountdownExample extends ApolloModuleExample { public abstract void setTntCountdownExample(); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TransferExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TransferExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TransferExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TransferExample.java index 5bdf38d1..47a82be7 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/TransferExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/TransferExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class TransferExample extends ApolloExample { +public abstract class TransferExample extends ApolloModuleExample { public abstract void transferExample(Player player); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/VignetteExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/VignetteExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/VignetteExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/VignetteExample.java index fc6b8520..159f335e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/VignetteExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/VignetteExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class VignetteExample extends ApolloExample { +public abstract class VignetteExample extends ApolloModuleExample { public abstract void displayVignetteExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/WaypointExample.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/WaypointExample.java similarity index 88% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/WaypointExample.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/WaypointExample.java index 9859b498..8d41b546 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/modules/impl/WaypointExample.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/module/impl/WaypointExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common.modules.impl; +package com.lunarclient.apollo.example.module.impl; -import com.lunarclient.apollo.example.common.modules.ApolloExample; +import com.lunarclient.apollo.example.module.ApolloModuleExample; import org.bukkit.entity.Player; -public abstract class WaypointExample extends ApolloExample { +public abstract class WaypointExample extends ApolloModuleExample { public abstract void displayWaypointExample(Player viewer); diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/ItemUtil.java b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/util/ItemUtil.java similarity index 98% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/common/ItemUtil.java rename to bukkit-example-common/src/main/java/com/lunarclient/apollo/example/util/ItemUtil.java index a7070e1d..9bfc1eaa 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/ItemUtil.java +++ b/bukkit-example-common/src/main/java/com/lunarclient/apollo/example/util/ItemUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.common; +package com.lunarclient.apollo.example.util; import net.minecraft.server.v1_8_R3.NBTTagCompound; import org.bukkit.Material; diff --git a/bukkit-example-json/build.gradle.kts b/bukkit-example-json/build.gradle.kts new file mode 100644 index 00000000..d47b7a44 --- /dev/null +++ b/bukkit-example-json/build.gradle.kts @@ -0,0 +1,15 @@ +plugins { + id("apollo.base-conventions") + id("apollo.shadow-conventions") +} + +dependencies { + api(libs.bundles.adventure) { + exclude("org.checkerframework") + exclude("net.kyori", "adventure-api") + exclude("net.kyori", "adventure-bom") + } + + compileOnly(libs.bukkit) + implementation(project(":apollo-bukkit-example-common")) +} diff --git a/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/ApolloJsonExamplePlatform.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/ApolloJsonExamplePlatform.java new file mode 100644 index 00000000..460b610b --- /dev/null +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/ApolloJsonExamplePlatform.java @@ -0,0 +1,106 @@ +/* + * This file is part of Apollo, licensed under the MIT License. + * + * Copyright (c) 2023 Moonsworth + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.lunarclient.apollo.example.json; + +import com.lunarclient.apollo.example.ApolloExamplePlugin; +import com.lunarclient.apollo.example.ApolloExampleType; +import com.lunarclient.apollo.example.json.listener.ApolloPlayerJsonListener; +import com.lunarclient.apollo.example.json.module.BeamJsonExample; +import com.lunarclient.apollo.example.json.module.BorderJsonExample; +import com.lunarclient.apollo.example.json.module.ChatJsonExample; +import com.lunarclient.apollo.example.json.module.ColoredFireJsonExample; +import com.lunarclient.apollo.example.json.module.CombatJsonExample; +import com.lunarclient.apollo.example.json.module.CooldownJsonExample; +import com.lunarclient.apollo.example.json.module.EntityJsonExample; +import com.lunarclient.apollo.example.json.module.GlowJsonExample; +import com.lunarclient.apollo.example.json.module.HologramJsonExample; +import com.lunarclient.apollo.example.json.module.LimbJsonExample; +import com.lunarclient.apollo.example.json.module.ModSettingsJsonExample; +import com.lunarclient.apollo.example.json.module.NametagJsonExample; +import com.lunarclient.apollo.example.json.module.NickHiderJsonExample; +import com.lunarclient.apollo.example.json.module.NotificationJsonExample; +import com.lunarclient.apollo.example.json.module.RichPresenceJsonExample; +import com.lunarclient.apollo.example.json.module.ServerRuleJsonExample; +import com.lunarclient.apollo.example.json.module.StaffModJsonExample; +import com.lunarclient.apollo.example.json.module.StopwatchJsonExample; +import com.lunarclient.apollo.example.json.module.TeamJsonExample; +import com.lunarclient.apollo.example.json.module.TebexJsonExample; +import com.lunarclient.apollo.example.json.module.TitleJsonExample; +import com.lunarclient.apollo.example.json.module.TntCountdownJsonExample; +import com.lunarclient.apollo.example.json.module.TransferJsonExample; +import com.lunarclient.apollo.example.json.module.VignetteJsonExample; +import com.lunarclient.apollo.example.json.module.WaypointJsonExample; +import lombok.Getter; + +@Getter +public class ApolloJsonExamplePlatform extends ApolloExamplePlugin { + + @Getter + private static ApolloJsonExamplePlatform instance; + + @Override + public void enable() { + instance = this; + } + + @Override + public void registerModuleExamples() { + this.setBeamExample(new BeamJsonExample()); + this.setBorderExample(new BorderJsonExample()); + this.setChatExample(new ChatJsonExample()); + this.setColoredFireExample(new ColoredFireJsonExample()); + this.setCombatExample(new CombatJsonExample()); + this.setCooldownExample(new CooldownJsonExample()); + this.setEntityExample(new EntityJsonExample()); + this.setGlowExample(new GlowJsonExample()); + this.setHologramExample(new HologramJsonExample()); + this.setLimbExample(new LimbJsonExample()); + this.setModSettingsExample(new ModSettingsJsonExample()); + this.setNametagExample(new NametagJsonExample()); + this.setNickHiderExample(new NickHiderJsonExample()); + this.setNotificationExample(new NotificationJsonExample()); + this.setRichPresenceExample(new RichPresenceJsonExample()); + this.setServerRuleExample(new ServerRuleJsonExample()); + this.setStaffModExample(new StaffModJsonExample()); + this.setStopwatchExample(new StopwatchJsonExample()); + this.setTeamExample(new TeamJsonExample()); + this.setTebexExample(new TebexJsonExample()); + this.setTitleExample(new TitleJsonExample()); + this.setTntCountdownExample(new TntCountdownJsonExample()); + this.setTransferExample(new TransferJsonExample()); + this.setVignetteExample(new VignetteJsonExample()); + this.setWaypointExample(new WaypointJsonExample()); + } + + @Override + public void registerListeners() { + new ApolloPlayerJsonListener(this); + } + + @Override + public ApolloExampleType getType() { + return ApolloExampleType.JSON; + } + +} diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/listeners/ApolloPlayerJsonListener.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/listener/ApolloPlayerJsonListener.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/listeners/ApolloPlayerJsonListener.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/listener/ApolloPlayerJsonListener.java index 688378e8..3de23bfa 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/listeners/ApolloPlayerJsonListener.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/listener/ApolloPlayerJsonListener.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.listeners; +package com.lunarclient.apollo.example.json.listener; import com.google.gson.JsonObject; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; import java.util.HashSet; import java.util.Set; import java.util.UUID; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/BeamJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/BeamJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/BeamJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/BeamJsonExample.java index 2446e73c..d67010e0 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/BeamJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/BeamJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.BeamExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.BeamExample; import java.awt.Color; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/BorderJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/BorderJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/BorderJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/BorderJsonExample.java index 317f2856..92293510 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/BorderJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/BorderJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.BorderExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.BorderExample; import java.awt.Color; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ChatJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ChatJsonExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ChatJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ChatJsonExample.java index cb6ae53f..428005af 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ChatJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ChatJsonExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ChatExample; -import com.lunarclient.apollo.example.json.AdventureUtil; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.AdventureUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.ChatExample; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.scheduler.BukkitRunnable; @@ -65,7 +65,7 @@ public void run() { } }; - runnable.runTaskTimer(ApolloExamplePlugin.getPlugin(), 0L, 20L); + runnable.runTaskTimer(ApolloExamplePlugin.getInstance(), 0L, 20L); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ColoredFireJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ColoredFireJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ColoredFireJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ColoredFireJsonExample.java index 662335b0..3c146139 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ColoredFireJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ColoredFireJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.ColoredFireExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.ColoredFireExample; import java.awt.Color; import java.util.UUID; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/CombatJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/CombatJsonExample.java similarity index 87% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/CombatJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/CombatJsonExample.java index 94e32230..31559640 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/CombatJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/CombatJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.CombatExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.CombatExample; import java.util.HashMap; import java.util.Map; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/CooldownJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/CooldownJsonExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/CooldownJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/CooldownJsonExample.java index 2bf52d19..96393e8b 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/CooldownJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/CooldownJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.CooldownExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.CooldownExample; import java.time.Duration; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/EntityJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/EntityJsonExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/EntityJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/EntityJsonExample.java index 9094fc3b..c1f6c3d5 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/EntityJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/EntityJsonExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonArray; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.EntityExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.EntityExample; import org.bukkit.entity.Cow; import org.bukkit.entity.Player; import org.bukkit.entity.Sheep; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/GlowJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/GlowJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/GlowJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/GlowJsonExample.java index fef33533..dd1b8786 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/GlowJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/GlowJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.GlowExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.GlowExample; import java.awt.Color; import java.util.UUID; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/HologramJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/HologramJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/HologramJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/HologramJsonExample.java index 101e498b..c6692845 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/HologramJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/HologramJsonExample.java @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; -import com.lunarclient.apollo.example.common.modules.impl.HologramExample; -import com.lunarclient.apollo.example.json.AdventureUtil; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.AdventureUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.HologramExample; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextDecoration; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/LimbJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/LimbJsonExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/LimbJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/LimbJsonExample.java index 9790e81e..33ec2f5c 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/LimbJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/LimbJsonExample.java @@ -21,15 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; -import com.lunarclient.apollo.example.common.modules.impl.LimbExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.LimbExample; import org.bukkit.entity.Player; public class LimbJsonExample extends LimbExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ModSettingsJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ModSettingsJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ModSettingsJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ModSettingsJsonExample.java index 6982ad1e..fc3b577b 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ModSettingsJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ModSettingsJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.ModSettingsExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.ModSettingsExample; import java.util.HashMap; import java.util.Map; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NametagJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NametagJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NametagJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NametagJsonExample.java index 74283938..c994179c 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NametagJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NametagJsonExample.java @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; -import com.lunarclient.apollo.example.common.modules.impl.NametagExample; -import com.lunarclient.apollo.example.json.AdventureUtil; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.AdventureUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.NametagExample; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextDecoration; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NickHiderJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NickHiderJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NickHiderJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NickHiderJsonExample.java index c93cca16..0b1dfd62 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NickHiderJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NickHiderJsonExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.NickHiderExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.NickHiderExample; import org.bukkit.entity.Player; public class NickHiderJsonExample extends NickHiderExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NotificationJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NotificationJsonExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NotificationJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NotificationJsonExample.java index 13c860ca..9a587a49 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/NotificationJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/NotificationJsonExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.NotificationExample; -import com.lunarclient.apollo.example.json.AdventureUtil; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.AdventureUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.NotificationExample; import java.time.Duration; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/RichPresenceJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/RichPresenceJsonExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/RichPresenceJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/RichPresenceJsonExample.java index 855f6283..b238fa47 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/RichPresenceJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/RichPresenceJsonExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.RichPresenceExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.RichPresenceExample; import org.bukkit.entity.Player; public class RichPresenceJsonExample extends RichPresenceExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ServerRuleJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ServerRuleJsonExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ServerRuleJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ServerRuleJsonExample.java index ea6ab10d..e4b38ddb 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/ServerRuleJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/ServerRuleJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.ServerRuleExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.ServerRuleExample; import java.util.HashMap; import java.util.Map; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/StaffModJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/StaffModJsonExample.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/StaffModJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/StaffModJsonExample.java index 88c45481..73600ae5 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/StaffModJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/StaffModJsonExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; -import com.lunarclient.apollo.example.common.modules.impl.StaffModExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.StaffModExample; import java.util.stream.Stream; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/StopwatchJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/StopwatchJsonExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/StopwatchJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/StopwatchJsonExample.java index 3d64539c..64b7f332 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/StopwatchJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/StopwatchJsonExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.StopwatchExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.StopwatchExample; import org.bukkit.entity.Player; public class StopwatchJsonExample extends StopwatchExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TeamJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TeamJsonExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TeamJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TeamJsonExample.java index 61d933e0..ec6fd832 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TeamJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TeamJsonExample.java @@ -21,17 +21,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TeamExample; -import com.lunarclient.apollo.example.json.AdventureUtil; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.AdventureUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.TeamExample; import java.awt.Color; import java.util.Map; import java.util.Optional; @@ -54,7 +54,7 @@ public class TeamJsonExample extends TeamExample implements Listener { public TeamJsonExample() { new TeamUpdateTask(); - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @EventHandler @@ -177,7 +177,7 @@ public int hashCode() { public class TeamUpdateTask extends BukkitRunnable { public TeamUpdateTask() { - this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L); + this.runTaskTimerAsynchronously(ApolloExamplePlugin.getInstance(), 1L, 1L); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TebexJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TebexJsonExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TebexJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TebexJsonExample.java index ff740125..a3a8920c 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TebexJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TebexJsonExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.TebexExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.TebexExample; import org.bukkit.entity.Player; public class TebexJsonExample extends TebexExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TitleJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TitleJsonExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TitleJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TitleJsonExample.java index 184a6a89..31d4de8e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TitleJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TitleJsonExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.TitleExample; -import com.lunarclient.apollo.example.json.AdventureUtil; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.AdventureUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.TitleExample; import java.time.Duration; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TntCountdownJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TntCountdownJsonExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TntCountdownJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TntCountdownJsonExample.java index 6abac834..4af63875 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TntCountdownJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TntCountdownJsonExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TntCountdownExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.TntCountdownExample; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; @@ -56,7 +56,7 @@ public class TntCountdownJsonExample extends TntCountdownExample implements List } public TntCountdownJsonExample() { - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TransferJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TransferJsonExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TransferJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TransferJsonExample.java index 8fdc2719..340a4b7b 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/TransferJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/TransferJsonExample.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; -import com.lunarclient.apollo.example.common.modules.impl.TransferExample; +import com.lunarclient.apollo.example.module.impl.TransferExample; import org.bukkit.entity.Player; public class TransferJsonExample extends TransferExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/VignetteJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/VignetteJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/VignetteJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/VignetteJsonExample.java index 8a227562..d6720c4a 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/VignetteJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/VignetteJsonExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.VignetteExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.module.impl.VignetteExample; import org.bukkit.entity.Player; public class VignetteJsonExample extends VignetteExample { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/WaypointJsonExample.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/WaypointJsonExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/WaypointJsonExample.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/WaypointJsonExample.java index 1d206699..8907f3bb 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/examples/WaypointJsonExample.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/module/WaypointJsonExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json.examples; +package com.lunarclient.apollo.example.json.module; import com.google.gson.JsonObject; -import com.lunarclient.apollo.example.common.modules.impl.WaypointExample; -import com.lunarclient.apollo.example.json.JsonPacketUtil; -import com.lunarclient.apollo.example.json.JsonUtil; +import com.lunarclient.apollo.example.json.util.JsonPacketUtil; +import com.lunarclient.apollo.example.json.util.JsonUtil; +import com.lunarclient.apollo.example.module.impl.WaypointExample; import java.awt.Color; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/AdventureUtil.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/AdventureUtil.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/AdventureUtil.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/AdventureUtil.java index 91e172d2..2efd4938 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/AdventureUtil.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/AdventureUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json; +package com.lunarclient.apollo.example.json.util; import lombok.NonNull; import net.kyori.adventure.text.Component; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/JsonPacketUtil.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/JsonPacketUtil.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/JsonPacketUtil.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/JsonPacketUtil.java index 585cf7d8..1ac6bd83 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/JsonPacketUtil.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/JsonPacketUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json; +package com.lunarclient.apollo.example.json.util; import com.google.common.collect.HashBasedTable; import com.google.common.collect.Table; @@ -69,14 +69,14 @@ public final class JsonPacketUtil { } public static void sendPacket(Player player, JsonObject message) { - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "apollo:json", message.toString().getBytes()); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "apollo:json", message.toString().getBytes()); } public static void broadcastPacket(JsonObject message) { byte[] data = message.toString().getBytes(); Bukkit.getOnlinePlayers().forEach(player -> - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "apollo:json", data)); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "apollo:json", data)); } public static JsonObject createEnableModuleObject(@NotNull String module, Map properties) { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/JsonUtil.java b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/JsonUtil.java similarity index 99% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/json/JsonUtil.java rename to bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/JsonUtil.java index bc494929..18966567 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/json/JsonUtil.java +++ b/bukkit-example-json/src/main/java/com/lunarclient/apollo/example/json/util/JsonUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.json; +package com.lunarclient.apollo.example.json.util; import com.google.gson.JsonObject; import java.awt.Color; diff --git a/bukkit-example-json/src/main/resources/plugin.yml b/bukkit-example-json/src/main/resources/plugin.yml new file mode 100644 index 00000000..5e1e6ad2 --- /dev/null +++ b/bukkit-example-json/src/main/resources/plugin.yml @@ -0,0 +1,64 @@ +name: Apollo-Json-Example +main: com.lunarclient.apollo.example.json.ApolloJsonExamplePlatform +version: 1.1.7 +author: Moonsworth +softdepend: [ Apollo-Bukkit ] +api-version: 1.13 + +commands: + beam: + description: "Beams!" + border: + description: "Borders!" + chat: + description: "Chat!" + coloredfire: + description: "Colored Fires!" + combat: + description: "Combat!" + cooldown: + description: "Cooldowns!" + entity: + description: "Entity!" + glint: + description: "Glint!" + glow: + description: "Glow!" + hologram: + description: "Holograms!" + inventory: + description: "Inventory!" + limb: + description: "Limb!" + modsettings: + description: "ModSettings!" + nametag: + description: "Nametags!" + nickhider: + description: "Nick Hider!" + notification: + description: "Notifications!" + richpresence: + description: "Rich Presence!" + saturation: + description: "Saturation!" + serverrule: + description: "Server Rule!" + staffmod: + description: "Staff Mods!" + stopwatch: + description: "Stopwatch!" + team: + description: "Teams!" + tebex: + description: "Tebex!" + title: + description: "Titles!" + tntcountdown: + description: "TNT Countdown!" + transfer: + description: "Transfer!" + vignette: + description: "Vignette!" + waypoint: + description: "Waypoints!" diff --git a/bukkit-example-proto/build.gradle.kts b/bukkit-example-proto/build.gradle.kts new file mode 100644 index 00000000..ca42858e --- /dev/null +++ b/bukkit-example-proto/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("apollo.base-conventions") + id("apollo.shadow-conventions") +} + +dependencies { + api(libs.protobuf) + + api(libs.bundles.adventure) { + exclude("org.checkerframework") + exclude("net.kyori", "adventure-api") + exclude("net.kyori", "adventure-bom") + } + + compileOnly(libs.bukkit) + implementation(project(":apollo-bukkit-example-common")) +} diff --git a/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/ApolloProtoExamplePlatform.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/ApolloProtoExamplePlatform.java new file mode 100644 index 00000000..0b99292c --- /dev/null +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/ApolloProtoExamplePlatform.java @@ -0,0 +1,106 @@ +/* + * This file is part of Apollo, licensed under the MIT License. + * + * Copyright (c) 2023 Moonsworth + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.lunarclient.apollo.example.proto; + +import com.lunarclient.apollo.example.ApolloExamplePlugin; +import com.lunarclient.apollo.example.ApolloExampleType; +import com.lunarclient.apollo.example.proto.listener.ApolloPlayerProtoListener; +import com.lunarclient.apollo.example.proto.module.BeamProtoExample; +import com.lunarclient.apollo.example.proto.module.BorderProtoExample; +import com.lunarclient.apollo.example.proto.module.ChatProtoExample; +import com.lunarclient.apollo.example.proto.module.ColoredFireProtoExample; +import com.lunarclient.apollo.example.proto.module.CombatProtoExample; +import com.lunarclient.apollo.example.proto.module.CooldownProtoExample; +import com.lunarclient.apollo.example.proto.module.EntityProtoExample; +import com.lunarclient.apollo.example.proto.module.GlowProtoExample; +import com.lunarclient.apollo.example.proto.module.HologramProtoExample; +import com.lunarclient.apollo.example.proto.module.LimbProtoExample; +import com.lunarclient.apollo.example.proto.module.ModSettingsProtoExample; +import com.lunarclient.apollo.example.proto.module.NametagProtoExample; +import com.lunarclient.apollo.example.proto.module.NickHiderProtoExample; +import com.lunarclient.apollo.example.proto.module.NotificationProtoExample; +import com.lunarclient.apollo.example.proto.module.RichPresenceProtoExample; +import com.lunarclient.apollo.example.proto.module.ServerRuleProtoExample; +import com.lunarclient.apollo.example.proto.module.StaffModProtoExample; +import com.lunarclient.apollo.example.proto.module.StopwatchProtoExample; +import com.lunarclient.apollo.example.proto.module.TeamProtoExample; +import com.lunarclient.apollo.example.proto.module.TebexProtoExample; +import com.lunarclient.apollo.example.proto.module.TitleProtoExample; +import com.lunarclient.apollo.example.proto.module.TntCountdownProtoExample; +import com.lunarclient.apollo.example.proto.module.TransferProtoExample; +import com.lunarclient.apollo.example.proto.module.VignetteProtoExample; +import com.lunarclient.apollo.example.proto.module.WaypointProtoExample; +import lombok.Getter; + +@Getter +public class ApolloProtoExamplePlatform extends ApolloExamplePlugin { + + @Getter + private static ApolloProtoExamplePlatform instance; + + @Override + public void enable() { + instance = this; + } + + @Override + public void registerModuleExamples() { + this.setBeamExample(new BeamProtoExample()); + this.setBorderExample(new BorderProtoExample()); + this.setChatExample(new ChatProtoExample()); + this.setColoredFireExample(new ColoredFireProtoExample()); + this.setCombatExample(new CombatProtoExample()); + this.setCooldownExample(new CooldownProtoExample()); + this.setEntityExample(new EntityProtoExample()); + this.setGlowExample(new GlowProtoExample()); + this.setHologramExample(new HologramProtoExample()); + this.setLimbExample(new LimbProtoExample()); + this.setModSettingsExample(new ModSettingsProtoExample()); + this.setNametagExample(new NametagProtoExample()); + this.setNickHiderExample(new NickHiderProtoExample()); + this.setNotificationExample(new NotificationProtoExample()); + this.setRichPresenceExample(new RichPresenceProtoExample()); + this.setServerRuleExample(new ServerRuleProtoExample()); + this.setStaffModExample(new StaffModProtoExample()); + this.setStopwatchExample(new StopwatchProtoExample()); + this.setTeamExample(new TeamProtoExample()); + this.setTebexExample(new TebexProtoExample()); + this.setTitleExample(new TitleProtoExample()); + this.setTntCountdownExample(new TntCountdownProtoExample()); + this.setTransferExample(new TransferProtoExample()); + this.setVignetteExample(new VignetteProtoExample()); + this.setWaypointExample(new WaypointProtoExample()); + } + + @Override + public void registerListeners() { + new ApolloPlayerProtoListener(this); + } + + @Override + public ApolloExampleType getType() { + return ApolloExampleType.PROTO; + } + +} diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPacketReceiveProtoListener.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloPacketReceiveProtoListener.java similarity index 98% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPacketReceiveProtoListener.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloPacketReceiveProtoListener.java index 214cd6fc..4fb6e2d7 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPacketReceiveProtoListener.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloPacketReceiveProtoListener.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.listeners; +package com.lunarclient.apollo.example.proto.listener; import com.google.protobuf.Any; import com.google.protobuf.InvalidProtocolBufferException; import com.lunarclient.apollo.common.v1.LunarClientVersion; import com.lunarclient.apollo.common.v1.MinecraftVersion; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.packetenrichment.v1.PlayerAttackMessage; import com.lunarclient.apollo.packetenrichment.v1.PlayerChatCloseMessage; import com.lunarclient.apollo.packetenrichment.v1.PlayerChatOpenMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPlayerProtoListener.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloPlayerProtoListener.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPlayerProtoListener.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloPlayerProtoListener.java index 07791f15..efcbcbe9 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloPlayerProtoListener.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloPlayerProtoListener.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.listeners; +package com.lunarclient.apollo.example.proto.listener; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.player.v1.UpdatePlayerWorldMessage; import java.util.HashSet; import java.util.Set; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloRoundtripProtoListener.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloRoundtripProtoListener.java similarity index 97% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloRoundtripProtoListener.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloRoundtripProtoListener.java index 3abd55f9..66738d56 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/listeners/ApolloRoundtripProtoListener.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/listener/ApolloRoundtripProtoListener.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.listeners; +package com.lunarclient.apollo.example.proto.listener; import com.google.protobuf.Any; import com.google.protobuf.GeneratedMessageV3; import com.google.protobuf.InvalidProtocolBufferException; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.transfer.v1.PingResponse; import com.lunarclient.apollo.transfer.v1.TransferResponse; import java.util.Map; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/BeamProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/BeamProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/BeamProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/BeamProtoExample.java index 0eba19f7..21c4fe2f 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/BeamProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/BeamProtoExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.lunarclient.apollo.beam.v1.DisplayBeaconBeamMessage; import com.lunarclient.apollo.beam.v1.RemoveBeaconBeamMessage; import com.lunarclient.apollo.beam.v1.ResetBeaconBeamsMessage; -import com.lunarclient.apollo.example.common.modules.impl.BeamExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.BeamExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import java.awt.Color; import org.bukkit.Location; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/BorderProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/BorderProtoExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/BorderProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/BorderProtoExample.java index 03f1d934..66809131 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/BorderProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/BorderProtoExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.lunarclient.apollo.border.v1.DisplayBorderMessage; import com.lunarclient.apollo.border.v1.RemoveBorderMessage; import com.lunarclient.apollo.border.v1.ResetBordersMessage; -import com.lunarclient.apollo.example.common.modules.impl.BorderExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.BorderExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import java.awt.Color; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ChatProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ChatProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ChatProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ChatProtoExample.java index 1ca24849..9c5be007 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ChatProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ChatProtoExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.lunarclient.apollo.chat.v1.DisplayLiveChatMessageMessage; import com.lunarclient.apollo.chat.v1.RemoveLiveChatMessageMessage; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.ChatExample; -import com.lunarclient.apollo.example.proto.AdventureUtil; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.ChatExample; +import com.lunarclient.apollo.example.proto.util.AdventureUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.scheduler.BukkitRunnable; @@ -65,7 +65,7 @@ public void run() { } }; - runnable.runTaskTimer(ApolloExamplePlugin.getPlugin(), 0L, 20L); + runnable.runTaskTimer(ApolloExamplePlugin.getInstance(), 0L, 20L); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ColoredFireProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ColoredFireProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ColoredFireProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ColoredFireProtoExample.java index 7c201692..b3f98da1 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ColoredFireProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ColoredFireProtoExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.lunarclient.apollo.coloredfire.v1.OverrideColoredFireMessage; import com.lunarclient.apollo.coloredfire.v1.ResetColoredFireMessage; import com.lunarclient.apollo.coloredfire.v1.ResetColoredFiresMessage; -import com.lunarclient.apollo.example.common.modules.impl.ColoredFireExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.ColoredFireExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import java.awt.Color; import java.util.UUID; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/CombatProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/CombatProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/CombatProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/CombatProtoExample.java index 69d5b67f..ae4ce94d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/CombatProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/CombatProtoExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.protobuf.Value; import com.lunarclient.apollo.configurable.v1.ConfigurableSettings; -import com.lunarclient.apollo.example.common.modules.impl.CombatExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.CombatExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import java.util.HashMap; import java.util.Map; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/CooldownProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/CooldownProtoExample.java similarity index 92% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/CooldownProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/CooldownProtoExample.java index 9746ec35..91d15069 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/CooldownProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/CooldownProtoExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.lunarclient.apollo.cooldown.v1.DisplayCooldownMessage; import com.lunarclient.apollo.cooldown.v1.RemoveCooldownMessage; import com.lunarclient.apollo.cooldown.v1.ResetCooldownsMessage; -import com.lunarclient.apollo.example.common.modules.impl.CooldownExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.CooldownExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import java.time.Duration; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/EntityProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/EntityProtoExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/EntityProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/EntityProtoExample.java index 80c450c9..d07b3a4e 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/EntityProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/EntityProtoExample.java @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.lunarclient.apollo.common.v1.EntityId; import com.lunarclient.apollo.entity.v1.FlipEntityMessage; import com.lunarclient.apollo.entity.v1.OverrideRainbowSheepMessage; import com.lunarclient.apollo.entity.v1.ResetFlipedEntityMessage; import com.lunarclient.apollo.entity.v1.ResetRainbowSheepMessage; -import com.lunarclient.apollo.example.common.modules.impl.EntityExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.EntityExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import java.util.Set; import java.util.stream.Collectors; import org.bukkit.entity.Cow; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/GlowProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/GlowProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/GlowProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/GlowProtoExample.java index 94546c5a..19fa1a43 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/GlowProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/GlowProtoExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.GlowExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.GlowExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.glow.v1.OverrideGlowEffectMessage; import com.lunarclient.apollo.glow.v1.ResetGlowEffectMessage; import com.lunarclient.apollo.glow.v1.ResetGlowEffectsMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/HologramProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/HologramProtoExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/HologramProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/HologramProtoExample.java index 2756b97b..f9735318 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/HologramProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/HologramProtoExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.common.collect.Lists; -import com.lunarclient.apollo.example.common.modules.impl.HologramExample; -import com.lunarclient.apollo.example.proto.AdventureUtil; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.HologramExample; +import com.lunarclient.apollo.example.proto.util.AdventureUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.hologram.v1.DisplayHologramMessage; import com.lunarclient.apollo.hologram.v1.RemoveHologramMessage; import com.lunarclient.apollo.hologram.v1.ResetHologramsMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/LimbProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/LimbProtoExample.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/LimbProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/LimbProtoExample.java index ee22585d..4664a492 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/LimbProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/LimbProtoExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.LimbExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.LimbExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.limb.v1.ArmorPiece; import com.lunarclient.apollo.limb.v1.BodyPart; import com.lunarclient.apollo.limb.v1.HideArmorPiecesMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ModSettingsProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ModSettingsProtoExample.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ModSettingsProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ModSettingsProtoExample.java index e9056e7e..86265bcb 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ModSettingsProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ModSettingsProtoExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.protobuf.NullValue; import com.google.protobuf.Value; import com.lunarclient.apollo.configurable.v1.ConfigurableSettings; -import com.lunarclient.apollo.example.common.modules.impl.ModSettingsExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.ModSettingsExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import java.util.HashMap; import java.util.Map; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NametagProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NametagProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NametagProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NametagProtoExample.java index 8bafd5f8..e553bf5d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NametagProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NametagProtoExample.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.common.collect.Lists; -import com.lunarclient.apollo.example.common.modules.impl.NametagExample; -import com.lunarclient.apollo.example.proto.AdventureUtil; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.NametagExample; +import com.lunarclient.apollo.example.proto.util.AdventureUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.nametag.v1.OverrideNametagMessage; import com.lunarclient.apollo.nametag.v1.ResetNametagMessage; import com.lunarclient.apollo.nametag.v1.ResetNametagsMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NickHiderProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NickHiderProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NickHiderProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NickHiderProtoExample.java index 9fb7dc47..0e2df4c6 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NickHiderProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NickHiderProtoExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.NickHiderExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.NickHiderExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.nickhider.v1.OverrideNickHiderMessage; import com.lunarclient.apollo.nickhider.v1.ResetNickHiderMessage; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NotificationProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NotificationProtoExample.java similarity index 89% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NotificationProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NotificationProtoExample.java index 6ee666da..92f5c5ed 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/NotificationProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/NotificationProtoExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.NotificationExample; -import com.lunarclient.apollo.example.proto.AdventureUtil; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.NotificationExample; +import com.lunarclient.apollo.example.proto.util.AdventureUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.notification.v1.DisplayNotificationMessage; import com.lunarclient.apollo.notification.v1.ResetNotificationsMessage; import java.time.Duration; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/RichPresenceProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/RichPresenceProtoExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/RichPresenceProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/RichPresenceProtoExample.java index d407941a..338dbcbb 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/RichPresenceProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/RichPresenceProtoExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.RichPresenceExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.RichPresenceExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.richpresence.v1.OverrideServerRichPresenceMessage; import com.lunarclient.apollo.richpresence.v1.ResetServerRichPresenceMessage; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ServerRuleProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ServerRuleProtoExample.java similarity index 93% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ServerRuleProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ServerRuleProtoExample.java index 32f8c9a4..c6c39c7d 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/ServerRuleProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/ServerRuleProtoExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.protobuf.Value; import com.lunarclient.apollo.configurable.v1.ConfigurableSettings; -import com.lunarclient.apollo.example.common.modules.impl.ServerRuleExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.ServerRuleExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import java.util.HashMap; import java.util.Map; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/StaffModProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/StaffModProtoExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/StaffModProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/StaffModProtoExample.java index 9e6a8299..d3047d41 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/StaffModProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/StaffModProtoExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.StaffModExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.StaffModExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.staffmod.v1.DisableStaffModsMessage; import com.lunarclient.apollo.staffmod.v1.EnableStaffModsMessage; import com.lunarclient.apollo.staffmod.v1.StaffMod; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/StopwatchProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/StopwatchProtoExample.java similarity index 91% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/StopwatchProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/StopwatchProtoExample.java index 67ea1840..53c3e829 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/StopwatchProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/StopwatchProtoExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.StopwatchExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.StopwatchExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.stopwatch.v1.ResetStopwatchMessage; import com.lunarclient.apollo.stopwatch.v1.StartStopwatchMessage; import com.lunarclient.apollo.stopwatch.v1.StopStopwatchMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TeamProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TeamProtoExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TeamProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TeamProtoExample.java index 5837c985..22fedffa 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TeamProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TeamProtoExample.java @@ -21,15 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TeamExample; -import com.lunarclient.apollo.example.proto.AdventureUtil; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.TeamExample; +import com.lunarclient.apollo.example.proto.util.AdventureUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.team.v1.ResetTeamMembersMessage; import com.lunarclient.apollo.team.v1.TeamMember; import com.lunarclient.apollo.team.v1.UpdateTeamMembersMessage; @@ -57,7 +57,7 @@ public class TeamProtoExample extends TeamExample implements Listener { public TeamProtoExample() { new TeamUpdateTask(); - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @EventHandler @@ -176,7 +176,7 @@ public int hashCode() { public class TeamUpdateTask extends BukkitRunnable { public TeamUpdateTask() { - this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L); + this.runTaskTimerAsynchronously(ApolloExamplePlugin.getInstance(), 1L, 1L); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TebexProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TebexProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TebexProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TebexProtoExample.java index d547ead0..bb3ab2ec 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TebexProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TebexProtoExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.TebexExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.TebexExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.tebex.v1.OpenTebexEmbeddedCheckoutMessage; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TitleProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TitleProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TitleProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TitleProtoExample.java index 705752a0..786e2c71 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TitleProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TitleProtoExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.json.examples.TitleJsonExample; -import com.lunarclient.apollo.example.proto.AdventureUtil; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.TitleExample; +import com.lunarclient.apollo.example.proto.util.AdventureUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.title.v1.DisplayTitleMessage; import com.lunarclient.apollo.title.v1.ResetTitlesMessage; import com.lunarclient.apollo.title.v1.TitleType; @@ -36,7 +36,7 @@ import net.kyori.adventure.text.format.TextDecoration; import org.bukkit.entity.Player; -public class TitleProtoExample extends TitleJsonExample { +public class TitleProtoExample extends TitleExample { @Override public void displayTitleExample(Player viewer) { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TntCountdownProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TntCountdownProtoExample.java similarity index 94% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TntCountdownProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TntCountdownProtoExample.java index 16ef01c3..b85fb2a9 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TntCountdownProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TntCountdownProtoExample.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.protobuf.Value; import com.lunarclient.apollo.configurable.v1.ConfigurableSettings; import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.impl.TntCountdownExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.TntCountdownExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.tntcountdown.v1.SetTntCountdownMessage; import java.lang.reflect.Method; import java.util.HashMap; @@ -57,7 +57,7 @@ public class TntCountdownProtoExample extends TntCountdownExample implements Lis } public TntCountdownProtoExample() { - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @Override diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TransferProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TransferProtoExample.java similarity index 95% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TransferProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TransferProtoExample.java index f674601b..5e2b8c20 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/TransferProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/TransferProtoExample.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; import com.google.common.collect.Lists; import com.google.protobuf.ByteString; -import com.lunarclient.apollo.example.common.modules.impl.TransferExample; -import com.lunarclient.apollo.example.proto.listeners.ApolloRoundtripProtoListener; +import com.lunarclient.apollo.example.module.impl.TransferExample; +import com.lunarclient.apollo.example.proto.listener.ApolloRoundtripProtoListener; import com.lunarclient.apollo.transfer.v1.PingData; import com.lunarclient.apollo.transfer.v1.PingRequest; import com.lunarclient.apollo.transfer.v1.PingResponse; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/VignetteProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/VignetteProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/VignetteProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/VignetteProtoExample.java index 3cb665c9..6fb59896 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/VignetteProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/VignetteProtoExample.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.VignetteExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; +import com.lunarclient.apollo.example.module.impl.VignetteExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; import com.lunarclient.apollo.vignette.v1.DisplayVignetteMessage; import com.lunarclient.apollo.vignette.v1.ResetVignetteMessage; import org.bukkit.entity.Player; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/WaypointProtoExample.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/WaypointProtoExample.java similarity index 90% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/WaypointProtoExample.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/WaypointProtoExample.java index df457fa9..523f81c7 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/examples/WaypointProtoExample.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/module/WaypointProtoExample.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto.examples; +package com.lunarclient.apollo.example.proto.module; -import com.lunarclient.apollo.example.common.modules.impl.WaypointExample; -import com.lunarclient.apollo.example.proto.ProtobufPacketUtil; -import com.lunarclient.apollo.example.proto.ProtobufUtil; +import com.lunarclient.apollo.example.module.impl.WaypointExample; +import com.lunarclient.apollo.example.proto.util.ProtobufPacketUtil; +import com.lunarclient.apollo.example.proto.util.ProtobufUtil; import com.lunarclient.apollo.waypoint.v1.DisplayWaypointMessage; import com.lunarclient.apollo.waypoint.v1.RemoveWaypointMessage; import com.lunarclient.apollo.waypoint.v1.ResetWaypointsMessage; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/AdventureUtil.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/AdventureUtil.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/AdventureUtil.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/AdventureUtil.java index aaab531d..ad4ec611 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/AdventureUtil.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/AdventureUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto; +package com.lunarclient.apollo.example.proto.util; import lombok.NonNull; import net.kyori.adventure.text.Component; diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/ProtobufPacketUtil.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufPacketUtil.java similarity index 96% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/ProtobufPacketUtil.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufPacketUtil.java index 4810dfcb..97590deb 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/ProtobufPacketUtil.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufPacketUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto; +package com.lunarclient.apollo.example.proto.util; import com.google.common.collect.HashBasedTable; import com.google.common.collect.Table; @@ -102,14 +102,14 @@ public static ConfigurableSettings createModuleMessage(String module, Map - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "lunar:apollo", bytes)); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "lunar:apollo", bytes)); } private ProtobufPacketUtil() { diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/ProtobufUtil.java b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufUtil.java similarity index 99% rename from bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/ProtobufUtil.java rename to bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufUtil.java index a8ea6dfe..ff985cea 100644 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/proto/ProtobufUtil.java +++ b/bukkit-example-proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.lunarclient.apollo.example.proto; +package com.lunarclient.apollo.example.proto.util; import com.google.protobuf.Timestamp; import com.lunarclient.apollo.common.v1.AdvancedResourceLocationIcon; diff --git a/bukkit-example-proto/src/main/resources/plugin.yml b/bukkit-example-proto/src/main/resources/plugin.yml new file mode 100644 index 00000000..d4142aea --- /dev/null +++ b/bukkit-example-proto/src/main/resources/plugin.yml @@ -0,0 +1,64 @@ +name: Apollo-Proto-Example +main: com.lunarclient.apollo.example.proto.ApolloProtoExamplePlatform +version: 1.1.7 +author: Moonsworth +softdepend: [ Apollo-Bukkit ] +api-version: 1.13 + +commands: + beam: + description: "Beams!" + border: + description: "Borders!" + chat: + description: "Chat!" + coloredfire: + description: "Colored Fires!" + combat: + description: "Combat!" + cooldown: + description: "Cooldowns!" + entity: + description: "Entity!" + glint: + description: "Glint!" + glow: + description: "Glow!" + hologram: + description: "Holograms!" + inventory: + description: "Inventory!" + limb: + description: "Limb!" + modsettings: + description: "ModSettings!" + nametag: + description: "Nametags!" + nickhider: + description: "Nick Hider!" + notification: + description: "Notifications!" + richpresence: + description: "Rich Presence!" + saturation: + description: "Saturation!" + serverrule: + description: "Server Rule!" + staffmod: + description: "Staff Mods!" + stopwatch: + description: "Stopwatch!" + team: + description: "Teams!" + tebex: + description: "Tebex!" + title: + description: "Titles!" + tntcountdown: + description: "TNT Countdown!" + transfer: + description: "Transfer!" + vignette: + description: "Vignette!" + waypoint: + description: "Waypoints!" diff --git a/bukkit-example/build.gradle.kts b/bukkit-example/build.gradle.kts deleted file mode 100644 index 3f9240e3..00000000 --- a/bukkit-example/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -plugins { - id("apollo.base-conventions") - id("apollo.shadow-conventions") -} - -dependencies { - compileOnly(libs.bukkit.api) - - // Used for Proto Implementation - api(libs.protobuf) - - // Used for Proto & Json Implementation - api(libs.bundles.adventure) { - exclude("org.checkerframework") - exclude("net.kyori", "adventure-api") - exclude("net.kyori", "adventure-bom") - } - - // Used for API Implementation - compileOnly(project(":extra:apollo-extra-adventure4")) - compileOnly(project(path = ":apollo-api", configuration = "bukkit")) - compileOnly(project(path = ":apollo-common", configuration = "shadow")) -} diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java b/bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java deleted file mode 100644 index 3043153b..00000000 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/ApolloExamplePlugin.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example; - -import com.lunarclient.apollo.example.api.examples.BeamApiExample; -import com.lunarclient.apollo.example.api.examples.BorderApiExample; -import com.lunarclient.apollo.example.api.examples.ChatApiExample; -import com.lunarclient.apollo.example.api.examples.ColoredFireApiExample; -import com.lunarclient.apollo.example.api.examples.CombatApiExample; -import com.lunarclient.apollo.example.api.examples.CooldownApiExample; -import com.lunarclient.apollo.example.api.examples.EntityApiExample; -import com.lunarclient.apollo.example.api.examples.GlowApiExample; -import com.lunarclient.apollo.example.api.examples.HologramApiExample; -import com.lunarclient.apollo.example.api.examples.LimbApiExample; -import com.lunarclient.apollo.example.api.examples.ModSettingsApiExample; -import com.lunarclient.apollo.example.api.examples.NametagApiExample; -import com.lunarclient.apollo.example.api.examples.NickHiderApiExample; -import com.lunarclient.apollo.example.api.examples.NotificationApiExample; -import com.lunarclient.apollo.example.api.examples.RichPresenceApiExample; -import com.lunarclient.apollo.example.api.examples.ServerRuleApiExample; -import com.lunarclient.apollo.example.api.examples.StaffModApiExample; -import com.lunarclient.apollo.example.api.examples.StopwatchApiExample; -import com.lunarclient.apollo.example.api.examples.TeamApiExample; -import com.lunarclient.apollo.example.api.examples.TebexApiExample; -import com.lunarclient.apollo.example.api.examples.TitleApiExample; -import com.lunarclient.apollo.example.api.examples.TntCountdownApiExample; -import com.lunarclient.apollo.example.api.examples.TransferApiExample; -import com.lunarclient.apollo.example.api.examples.VignetteApiExample; -import com.lunarclient.apollo.example.api.examples.WaypointApiExample; -import com.lunarclient.apollo.example.api.listeners.ApolloPlayerApiListener; -import com.lunarclient.apollo.example.common.commands.SwitchCommand; -import com.lunarclient.apollo.example.common.commands.debug.ApolloDebugCommand; -import com.lunarclient.apollo.example.common.commands.module.BeamCommand; -import com.lunarclient.apollo.example.common.commands.module.BorderCommand; -import com.lunarclient.apollo.example.common.commands.module.ChatCommand; -import com.lunarclient.apollo.example.common.commands.module.ColoredFireCommand; -import com.lunarclient.apollo.example.common.commands.module.CombatCommand; -import com.lunarclient.apollo.example.common.commands.module.CooldownCommand; -import com.lunarclient.apollo.example.common.commands.module.EntityCommand; -import com.lunarclient.apollo.example.common.commands.module.GlintCommand; -import com.lunarclient.apollo.example.common.commands.module.GlowCommand; -import com.lunarclient.apollo.example.common.commands.module.HologramCommand; -import com.lunarclient.apollo.example.common.commands.module.InventoryCommand; -import com.lunarclient.apollo.example.common.commands.module.LimbCommand; -import com.lunarclient.apollo.example.common.commands.module.ModSettingsCommand; -import com.lunarclient.apollo.example.common.commands.module.NametagCommand; -import com.lunarclient.apollo.example.common.commands.module.NickHiderCommand; -import com.lunarclient.apollo.example.common.commands.module.NotificationCommand; -import com.lunarclient.apollo.example.common.commands.module.RichPresenceCommand; -import com.lunarclient.apollo.example.common.commands.module.SaturationCommand; -import com.lunarclient.apollo.example.common.commands.module.ServerRuleCommand; -import com.lunarclient.apollo.example.common.commands.module.StaffModCommand; -import com.lunarclient.apollo.example.common.commands.module.StopwatchCommand; -import com.lunarclient.apollo.example.common.commands.module.TeamCommand; -import com.lunarclient.apollo.example.common.commands.module.TebexCommand; -import com.lunarclient.apollo.example.common.commands.module.TitleCommand; -import com.lunarclient.apollo.example.common.commands.module.TntCountdownCommand; -import com.lunarclient.apollo.example.common.commands.module.TransferCommand; -import com.lunarclient.apollo.example.common.commands.module.VignetteCommand; -import com.lunarclient.apollo.example.common.commands.module.WaypointCommand; -import com.lunarclient.apollo.example.common.modules.ApolloExampleType; -import com.lunarclient.apollo.example.common.modules.impl.BeamExample; -import com.lunarclient.apollo.example.common.modules.impl.BorderExample; -import com.lunarclient.apollo.example.common.modules.impl.ChatExample; -import com.lunarclient.apollo.example.common.modules.impl.ColoredFireExample; -import com.lunarclient.apollo.example.common.modules.impl.CombatExample; -import com.lunarclient.apollo.example.common.modules.impl.CooldownExample; -import com.lunarclient.apollo.example.common.modules.impl.EntityExample; -import com.lunarclient.apollo.example.common.modules.impl.GlintExample; -import com.lunarclient.apollo.example.common.modules.impl.GlowExample; -import com.lunarclient.apollo.example.common.modules.impl.HologramExample; -import com.lunarclient.apollo.example.common.modules.impl.InventoryExample; -import com.lunarclient.apollo.example.common.modules.impl.LimbExample; -import com.lunarclient.apollo.example.common.modules.impl.ModSettingsExample; -import com.lunarclient.apollo.example.common.modules.impl.NametagExample; -import com.lunarclient.apollo.example.common.modules.impl.NickHiderExample; -import com.lunarclient.apollo.example.common.modules.impl.NotificationExample; -import com.lunarclient.apollo.example.common.modules.impl.RichPresenceExample; -import com.lunarclient.apollo.example.common.modules.impl.SaturationExample; -import com.lunarclient.apollo.example.common.modules.impl.ServerRuleExample; -import com.lunarclient.apollo.example.common.modules.impl.StaffModExample; -import com.lunarclient.apollo.example.common.modules.impl.StopwatchExample; -import com.lunarclient.apollo.example.common.modules.impl.TeamExample; -import com.lunarclient.apollo.example.common.modules.impl.TebexExample; -import com.lunarclient.apollo.example.common.modules.impl.TitleExample; -import com.lunarclient.apollo.example.common.modules.impl.TntCountdownExample; -import com.lunarclient.apollo.example.common.modules.impl.TransferExample; -import com.lunarclient.apollo.example.common.modules.impl.VignetteExample; -import com.lunarclient.apollo.example.common.modules.impl.WaypointExample; -import com.lunarclient.apollo.example.debug.SpamPacketDebug; -import com.lunarclient.apollo.example.json.examples.BeamJsonExample; -import com.lunarclient.apollo.example.json.examples.BorderJsonExample; -import com.lunarclient.apollo.example.json.examples.ChatJsonExample; -import com.lunarclient.apollo.example.json.examples.ColoredFireJsonExample; -import com.lunarclient.apollo.example.json.examples.CombatJsonExample; -import com.lunarclient.apollo.example.json.examples.CooldownJsonExample; -import com.lunarclient.apollo.example.json.examples.EntityJsonExample; -import com.lunarclient.apollo.example.json.examples.GlowJsonExample; -import com.lunarclient.apollo.example.json.examples.HologramJsonExample; -import com.lunarclient.apollo.example.json.examples.LimbJsonExample; -import com.lunarclient.apollo.example.json.examples.ModSettingsJsonExample; -import com.lunarclient.apollo.example.json.examples.NametagJsonExample; -import com.lunarclient.apollo.example.json.examples.NickHiderJsonExample; -import com.lunarclient.apollo.example.json.examples.NotificationJsonExample; -import com.lunarclient.apollo.example.json.examples.RichPresenceJsonExample; -import com.lunarclient.apollo.example.json.examples.ServerRuleJsonExample; -import com.lunarclient.apollo.example.json.examples.StaffModJsonExample; -import com.lunarclient.apollo.example.json.examples.StopwatchJsonExample; -import com.lunarclient.apollo.example.json.examples.TeamJsonExample; -import com.lunarclient.apollo.example.json.examples.TebexJsonExample; -import com.lunarclient.apollo.example.json.examples.TitleJsonExample; -import com.lunarclient.apollo.example.json.examples.TntCountdownJsonExample; -import com.lunarclient.apollo.example.json.examples.TransferJsonExample; -import com.lunarclient.apollo.example.json.examples.VignetteJsonExample; -import com.lunarclient.apollo.example.json.examples.WaypointJsonExample; -import com.lunarclient.apollo.example.json.listeners.ApolloPlayerJsonListener; -import com.lunarclient.apollo.example.proto.examples.BeamProtoExample; -import com.lunarclient.apollo.example.proto.examples.BorderProtoExample; -import com.lunarclient.apollo.example.proto.examples.ChatProtoExample; -import com.lunarclient.apollo.example.proto.examples.ColoredFireProtoExample; -import com.lunarclient.apollo.example.proto.examples.CombatProtoExample; -import com.lunarclient.apollo.example.proto.examples.CooldownProtoExample; -import com.lunarclient.apollo.example.proto.examples.EntityProtoExample; -import com.lunarclient.apollo.example.proto.examples.GlowProtoExample; -import com.lunarclient.apollo.example.proto.examples.HologramProtoExample; -import com.lunarclient.apollo.example.proto.examples.LimbProtoExample; -import com.lunarclient.apollo.example.proto.examples.ModSettingsProtoExample; -import com.lunarclient.apollo.example.proto.examples.NametagProtoExample; -import com.lunarclient.apollo.example.proto.examples.NickHiderProtoExample; -import com.lunarclient.apollo.example.proto.examples.NotificationProtoExample; -import com.lunarclient.apollo.example.proto.examples.RichPresenceProtoExample; -import com.lunarclient.apollo.example.proto.examples.ServerRuleProtoExample; -import com.lunarclient.apollo.example.proto.examples.StaffModProtoExample; -import com.lunarclient.apollo.example.proto.examples.StopwatchProtoExample; -import com.lunarclient.apollo.example.proto.examples.TeamProtoExample; -import com.lunarclient.apollo.example.proto.examples.TebexProtoExample; -import com.lunarclient.apollo.example.proto.examples.TitleProtoExample; -import com.lunarclient.apollo.example.proto.examples.TntCountdownProtoExample; -import com.lunarclient.apollo.example.proto.examples.TransferProtoExample; -import com.lunarclient.apollo.example.proto.examples.VignetteProtoExample; -import com.lunarclient.apollo.example.proto.examples.WaypointProtoExample; -import com.lunarclient.apollo.example.proto.listeners.ApolloPlayerProtoListener; -import lombok.Getter; -import org.bukkit.plugin.java.JavaPlugin; - -@Getter -public class ApolloExamplePlugin extends JavaPlugin { - - @Getter - private static ApolloExamplePlugin plugin; - - public static ApolloExampleType TYPE; - - private ApolloPlayerApiListener playerApiListener; - private ApolloPlayerProtoListener playerProtoListener; - private ApolloPlayerJsonListener playerJsonListener; - - private BeamExample beamExample; - private BorderExample borderExample; - private ChatExample chatExample; - private ColoredFireExample coloredFireExample; - private CombatExample combatExample; - private CooldownExample cooldownExample; - private EntityExample entityExample; - private GlintExample glintExample; - private GlowExample glowExample; - private HologramExample hologramExample; - private InventoryExample inventoryExample; - private LimbExample limbExample; - private ModSettingsExample modSettingsExample; - private NametagExample nametagExample; - private NickHiderExample nickHiderExample; - private NotificationExample notificationExample; - private RichPresenceExample richPresenceExample; - private SaturationExample saturationExample; - private ServerRuleExample serverRuleExample; - private StaffModExample staffModExample; - private StopwatchExample stopwatchExample; - private TeamExample teamExample; - private TebexExample tebexExample; - private TitleExample titleExample; - private TntCountdownExample tntCountdownExample; - private TransferExample transferExample; - private VignetteExample vignetteExample; - private WaypointExample waypointExample; - - private SpamPacketDebug spamPacketDebug; - - @Override - public void onEnable() { - plugin = this; - - this.changeImplementationType(ApolloExampleType.API); - this.registerCommands(); - } - - @Override - public void onDisable() { - - } - - private void registerCommands() { - this.getCommand("apollodebug").setExecutor(new ApolloDebugCommand()); - this.getCommand("switch").setExecutor(new SwitchCommand()); - - this.getCommand("beam").setExecutor(new BeamCommand()); - this.getCommand("border").setExecutor(new BorderCommand()); - this.getCommand("chat").setExecutor(new ChatCommand()); - this.getCommand("coloredfire").setExecutor(new ColoredFireCommand()); - this.getCommand("combat").setExecutor(new CombatCommand()); - this.getCommand("cooldown").setExecutor(new CooldownCommand()); - this.getCommand("entity").setExecutor(new EntityCommand()); - this.getCommand("glint").setExecutor(new GlintCommand()); - this.getCommand("glow").setExecutor(new GlowCommand()); - this.getCommand("hologram").setExecutor(new HologramCommand()); - this.getCommand("inventory").setExecutor(new InventoryCommand()); - this.getCommand("limb").setExecutor(new LimbCommand()); - this.getCommand("modsettings").setExecutor(new ModSettingsCommand()); - this.getCommand("nametag").setExecutor(new NametagCommand()); - this.getCommand("nickhider").setExecutor(new NickHiderCommand()); - this.getCommand("notification").setExecutor(new NotificationCommand()); - this.getCommand("richpresence").setExecutor(new RichPresenceCommand()); - this.getCommand("saturation").setExecutor(new SaturationCommand()); - this.getCommand("serverrule").setExecutor(new ServerRuleCommand()); - this.getCommand("staffmod").setExecutor(new StaffModCommand()); - this.getCommand("stopwatch").setExecutor(new StopwatchCommand()); - this.getCommand("team").setExecutor(new TeamCommand()); - this.getCommand("tebex").setExecutor(new TebexCommand()); - this.getCommand("title").setExecutor(new TitleCommand()); - this.getCommand("tntcountdown").setExecutor(new TntCountdownCommand()); - this.getCommand("transfer").setExecutor(new TransferCommand()); - this.getCommand("vignette").setExecutor(new VignetteCommand()); - this.getCommand("waypoint").setExecutor(new WaypointCommand()); - } - - public void changeImplementationType(ApolloExampleType type) { - TYPE = type; - - if (this.playerApiListener != null) { - this.playerApiListener.disable(); - this.playerApiListener = null; - } - - if (this.playerProtoListener != null) { - this.playerProtoListener.disable(); - this.playerProtoListener = null; - } - - if (this.playerJsonListener != null) { - this.playerJsonListener.disable(); - this.playerJsonListener = null; - } - - this.registerModuleExamples(); - this.registerListeners(); - } - - private void registerModuleExamples() { - this.spamPacketDebug = new SpamPacketDebug(); - - this.glintExample = new GlintExample(); - this.inventoryExample = new InventoryExample(); - this.saturationExample = new SaturationExample(); - - switch (TYPE) { - case API: { - this.beamExample = new BeamApiExample(); - this.borderExample = new BorderApiExample(); - this.chatExample = new ChatApiExample(); - this.coloredFireExample = new ColoredFireApiExample(); - this.combatExample = new CombatApiExample(); - this.cooldownExample = new CooldownApiExample(); - this.entityExample = new EntityApiExample(); - this.glowExample = new GlowApiExample(); - this.hologramExample = new HologramApiExample(); - this.limbExample = new LimbApiExample(); - this.modSettingsExample = new ModSettingsApiExample(); - this.nametagExample = new NametagApiExample(); - this.nickHiderExample = new NickHiderApiExample(); - this.notificationExample = new NotificationApiExample(); - this.richPresenceExample = new RichPresenceApiExample(); - this.serverRuleExample = new ServerRuleApiExample(); - this.staffModExample = new StaffModApiExample(); - this.stopwatchExample = new StopwatchApiExample(); - this.teamExample = new TeamApiExample(); - this.tebexExample = new TebexApiExample(); - this.titleExample = new TitleApiExample(); - this.tntCountdownExample = new TntCountdownApiExample(); - this.transferExample = new TransferApiExample(); - this.vignetteExample = new VignetteApiExample(); - this.waypointExample = new WaypointApiExample(); - break; - } - - case JSON: { - this.beamExample = new BeamJsonExample(); - this.borderExample = new BorderJsonExample(); - this.chatExample = new ChatJsonExample(); - this.coloredFireExample = new ColoredFireJsonExample(); - this.combatExample = new CombatJsonExample(); - this.cooldownExample = new CooldownJsonExample(); - this.entityExample = new EntityJsonExample(); - this.glowExample = new GlowJsonExample(); - this.hologramExample = new HologramJsonExample(); - this.limbExample = new LimbJsonExample(); - this.modSettingsExample = new ModSettingsJsonExample(); - this.nametagExample = new NametagJsonExample(); - this.nickHiderExample = new NickHiderJsonExample(); - this.notificationExample = new NotificationJsonExample(); - this.richPresenceExample = new RichPresenceJsonExample(); - this.serverRuleExample = new ServerRuleJsonExample(); - this.staffModExample = new StaffModJsonExample(); - this.stopwatchExample = new StopwatchJsonExample(); - this.teamExample = new TeamJsonExample(); - this.tebexExample = new TebexJsonExample(); - this.titleExample = new TitleJsonExample(); - this.tntCountdownExample = new TntCountdownJsonExample(); - this.transferExample = new TransferJsonExample(); - this.vignetteExample = new VignetteJsonExample(); - this.waypointExample = new WaypointJsonExample(); - break; - } - - case PROTO: { - this.beamExample = new BeamProtoExample(); - this.borderExample = new BorderProtoExample(); - this.chatExample = new ChatProtoExample(); - this.coloredFireExample = new ColoredFireProtoExample(); - this.combatExample = new CombatProtoExample(); - this.cooldownExample = new CooldownProtoExample(); - this.entityExample = new EntityProtoExample(); - this.glowExample = new GlowProtoExample(); - this.hologramExample = new HologramProtoExample(); - this.limbExample = new LimbProtoExample(); - this.modSettingsExample = new ModSettingsProtoExample(); - this.nametagExample = new NametagProtoExample(); - this.nickHiderExample = new NickHiderProtoExample(); - this.notificationExample = new NotificationProtoExample(); - this.richPresenceExample = new RichPresenceProtoExample(); - this.serverRuleExample = new ServerRuleProtoExample(); - this.staffModExample = new StaffModProtoExample(); - this.stopwatchExample = new StopwatchProtoExample(); - this.teamExample = new TeamProtoExample(); - this.tebexExample = new TebexProtoExample(); - this.titleExample = new TitleProtoExample(); - this.tntCountdownExample = new TntCountdownProtoExample(); - this.transferExample = new TransferProtoExample(); - this.vignetteExample = new VignetteProtoExample(); - this.waypointExample = new WaypointProtoExample(); - break; - } - } - } - - private void registerListeners() { - switch (TYPE) { - case API: { - this.playerApiListener = new ApolloPlayerApiListener(this); - break; - } - - case JSON: { - this.playerJsonListener = new ApolloPlayerJsonListener(this); - break; - } - - case PROTO: { - this.playerProtoListener = new ApolloPlayerProtoListener(this); - break; - } - } - } - -} diff --git a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/SwitchCommand.java b/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/SwitchCommand.java deleted file mode 100644 index 2a960e15..00000000 --- a/bukkit-example/src/main/java/com/lunarclient/apollo/example/common/commands/SwitchCommand.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of Apollo, licensed under the MIT License. - * - * Copyright (c) 2023 Moonsworth - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.lunarclient.apollo.example.common.commands; - -import com.lunarclient.apollo.example.ApolloExamplePlugin; -import com.lunarclient.apollo.example.common.modules.ApolloExampleType; -import java.util.NoSuchElementException; -import org.bukkit.Bukkit; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.plugin.Plugin; -import org.jetbrains.annotations.NotNull; - -public class SwitchCommand implements CommandExecutor { - - @Override - public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { - if (args.length != 1) { - sender.sendMessage("Usage: /switch "); - sender.sendMessage("Current implementation: " + ApolloExamplePlugin.TYPE.name()); - return true; - } - - ApolloExampleType type; - try { - type = ApolloExampleType.valueOf(args[0].toUpperCase()); - } catch (NoSuchElementException e) { - sender.sendMessage("No implementation '" + args[0] + "' found!"); - return false; - } - - if (type == ApolloExamplePlugin.TYPE) { - sender.sendMessage("The implementation type is already set to " + ApolloExamplePlugin.TYPE.name()); - return true; - } - - Plugin plugin = Bukkit.getPluginManager().getPlugin("Apollo-Bukkit"); - if (type == ApolloExampleType.API && plugin == null) { - sender.sendMessage("Can't switch implementation to API, the Apollo-Bukkit plugin must be running."); - return true; - } - - if (type != ApolloExampleType.API && plugin != null) { - sender.sendMessage("Can't switch implementation to " + ApolloExamplePlugin.TYPE.name() + ", the Apollo-Bukkit must be deleted."); - return true; - } - - ApolloExamplePlugin.getPlugin().changeImplementationType(type); - sender.sendMessage("Successfully switched example implementation to " + type.name() + "!"); - sender.sendMessage("Re-join the server to apply the changes!"); - return true; - } - -} diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 035705ec..00000000 --- a/deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Deploy apollo to the test server -set -e -./gradlew clean build -scp bukkit/build/libs/apollo-bukkit-1.1.8-SNAPSHOT.jar ubuntu@147.135.8.94:/home/ubuntu/apollo/plugins/ -scp bukkit-example/build/libs/apollo-bukkit-example-1.1.8-SNAPSHOT.jar ubuntu@147.135.8.94:/home/ubuntu/apollo/plugins/ -scp bukkit/build/libs/apollo-bukkit-1.1.8-SNAPSHOT.jar ubuntu@147.135.8.94:/home/ubuntu/lctest/plugins/ -scp bukkit-example/build/libs/apollo-bukkit-example-1.1.8-SNAPSHOT.jar ubuntu@147.135.8.94:/home/ubuntu/lctest/plugins/ diff --git a/docs/developers/lightweight/json/packet-util.mdx b/docs/developers/lightweight/json/packet-util.mdx index 2bec4a69..0a740d1e 100644 --- a/docs/developers/lightweight/json/packet-util.mdx +++ b/docs/developers/lightweight/json/packet-util.mdx @@ -55,14 +55,14 @@ Use the following methods to send packets either to a specific player or to all ```java public static void sendPacket(Player player, JsonObject message) { - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "apollo:json", message.toString().getBytes()); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "apollo:json", message.toString().getBytes()); } public static void broadcastPacket(JsonObject message) { byte[] data = message.toString().getBytes(); Bukkit.getOnlinePlayers().forEach(player -> - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "apollo:json", data)); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "apollo:json", data)); } ``` diff --git a/docs/developers/lightweight/protobuf/packet-util.mdx b/docs/developers/lightweight/protobuf/packet-util.mdx index fcac5c9b..3ea0b429 100644 --- a/docs/developers/lightweight/protobuf/packet-util.mdx +++ b/docs/developers/lightweight/protobuf/packet-util.mdx @@ -60,14 +60,14 @@ Use the following methods to send packets either to a specific player or to all ```java public static void sendPacket(Player player, GeneratedMessageV3 message) { byte[] bytes = Any.pack(message).toByteArray(); - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "lunar:apollo", bytes); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "lunar:apollo", bytes); } public static void broadcastPacket(GeneratedMessageV3 message) { byte[] bytes = Any.pack(message).toByteArray(); Bukkit.getOnlinePlayers().forEach(player -> - player.sendPluginMessage(ApolloExamplePlugin.getPlugin(), "lunar:apollo", bytes)); + player.sendPluginMessage(ApolloExamplePlugin.getInstance(), "lunar:apollo", bytes)); } ``` diff --git a/docs/developers/modules/chat.mdx b/docs/developers/modules/chat.mdx index add6a7fc..f9970118 100644 --- a/docs/developers/modules/chat.mdx +++ b/docs/developers/modules/chat.mdx @@ -51,7 +51,7 @@ public void displayLiveChatMessageExample() { } }; - runnable.runTaskTimer(ApolloExamplePlugin.getPlugin(), 0L, 20L); + runnable.runTaskTimer(ApolloExamplePlugin.getInstance(), 0L, 20L); } ``` @@ -100,7 +100,7 @@ public void displayLiveChatMessageExample() { } }; - runnable.runTaskTimer(ApolloExamplePlugin.getPlugin(), 0L, 20L); + runnable.runTaskTimer(ApolloExamplePlugin.getInstance(), 0L, 20L); } ``` @@ -154,7 +154,7 @@ public void displayLiveChatMessageExample() { } }; - runnable.runTaskTimer(ApolloExamplePlugin.getPlugin(), 0L, 20L); + runnable.runTaskTimer(ApolloExamplePlugin.getInstance(), 0L, 20L); } ``` diff --git a/docs/developers/modules/team.mdx b/docs/developers/modules/team.mdx index 431a6afc..8666cbf3 100644 --- a/docs/developers/modules/team.mdx +++ b/docs/developers/modules/team.mdx @@ -33,7 +33,7 @@ private final Map teamsByPlayerUuid = Maps.newHashMap(); public TeamExample() { new TeamUpdateTask(); - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @EventHandler @@ -154,7 +154,7 @@ public class Team { public class TeamUpdateTask extends BukkitRunnable { public TeamUpdateTask() { - this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L); + this.runTaskTimerAsynchronously(ApolloExamplePlugin.getInstance(), 1L, 1L); } @Override @@ -241,7 +241,7 @@ private final Map teamsByPlayerUuid = Maps.newHashMap(); public TeamProtoExample() { new TeamUpdateTask(); - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @EventHandler @@ -360,7 +360,7 @@ public class Team { public class TeamUpdateTask extends BukkitRunnable { public TeamUpdateTask() { - this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L); + this.runTaskTimerAsynchronously(ApolloExamplePlugin.getInstance(), 1L, 1L); } @Override @@ -381,7 +381,7 @@ private final Map teamsByPlayerUuid = Maps.newHashMap(); public TeamJsonExample() { new TeamUpdateTask(); - Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin()); + Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getInstance()); } @EventHandler @@ -503,7 +503,7 @@ public class Team { public class TeamUpdateTask extends BukkitRunnable { public TeamUpdateTask() { - this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L); + this.runTaskTimerAsynchronously(ApolloExamplePlugin.getInstance(), 1L, 1L); } @Override diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 00000000..7700c5fb --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,97 @@ +#!/bin/bash +set -eo pipefail + +VERSION="1.1.8-SNAPSHOT" +REMOTE_USER="ubuntu" +REMOTE_HOST="147.135.8.94" + +usage() { + echo "Usage: $0 [api|json|proto]" + echo "Available servers: apollo, test" + echo "Optional module (for bukkit servers only): api (default), json, proto" + exit 1 +} + +validate_server() { + case "$1" in + apollo|test) ;; + *) + echo "Unknown server: $1" + usage + ;; + esac +} + +validate_module() { + case "$1" in + api|json|proto) ;; + *) + echo "Unknown module: $1" + usage + ;; + esac +} + +deploy_files() { + local server="$1" + shift + local -a files=("${@:1:$#-1}") + local destination="${!#}" + + if [ -n "$MODULE" ]; then + echo "Deploying to $server server (module: $MODULE)..." + else + echo "Deploying to $server server..." + fi + + for file in "${files[@]}"; do + if [ ! -f "$file" ]; then + echo "Error: File $file not found!" + exit 1 + fi + scp "$file" "$REMOTE_USER@$REMOTE_HOST:$destination" + done +} + + +# Main script execution +[ $# -lt 1 ] && usage + +SERVER="$1" + +# Only assign an example module if server is apollo or test +if [[ "$SERVER" == "apollo" || "$SERVER" == "test" ]]; then + MODULE="${2:-api}" # Default to "api" if not provided + validate_module "$MODULE" +else + MODULE="" +fi + +validate_server "$SERVER" + +echo "Building project..." +./gradlew clean build + +declare -a files_to_copy +declare destination_path + +case "$SERVER" in + apollo) + files_to_copy=( + "bukkit/build/libs/apollo-bukkit-${VERSION}.jar" + "bukkit-example-${MODULE}/build/libs/apollo-bukkit-example-${MODULE}-${VERSION}.jar" + ) + destination_path="/home/ubuntu/apollo/plugins/" + ;; + test) + files_to_copy=( + "bukkit/build/libs/apollo-bukkit-${VERSION}.jar" + "bukkit-example-${MODULE}/build/libs/apollo-bukkit-example-${MODULE}-${VERSION}.jar" + ) + destination_path="/home/ubuntu/lctest/plugins/" + ;; +esac + +deploy_files "$SERVER" "${files_to_copy[@]}" "$destination_path" + +echo "Deployment to $SERVER completed successfully." diff --git a/settings.gradle.kts b/settings.gradle.kts index ecb0d4e8..201ecd26 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -36,7 +36,10 @@ listOfNotNull( "api", "common", "bukkit", - "bukkit-example", + "bukkit-example-common", + "bukkit-example-api", + "bukkit-example-json", + "bukkit-example-proto", if (loadAllVersions) "bungee" else null, if (loadAllVersions) "velocity" else null ).forEach {