From 4c8ffa5a9eae87c3713898b1d393f5d5c03c3039 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Mon, 31 Oct 2016 00:47:13 -0400 Subject: [PATCH] Added Module Class, for extra portability --- src/alisolarflare/AliPresents.java | 29 ++----------------- src/alisolarflare/modules/Module.java | 4 +-- src/alisolarflare/modules/Registerable.java | 2 +- .../components/flairdoor/FlairDoorModule.java | 29 ++++++++++--------- .../flairdoor/commands/FlairMe.java | 4 ++- .../commands/SetFlairDoorColour.java | 2 +- .../flairdoor/listeners/PortalListener.java | 9 +++--- .../components/gpowers/GPowerModule.java | 22 ++++++++++++++ .../gpowers/commands/PowerDown.java | 2 +- .../components/gpowers/commands/PowerUp.java | 2 +- .../gpowers/commands/gPowerCommand.java | 4 ++- .../components/gpowers/gPowerMemory.java | 2 +- .../gpowers/listeners/gPowerApplyingTask.java | 10 +++---- .../gpowers/listeners/gPowerListener.java | 10 +++---- .../components/links/AliLinkModule.java | 24 ++++++++------- .../links/commands/PressAliLink.java | 16 +++++----- .../components/links/commands/SetAliLink.java | 16 +++++----- .../components/links/entities/Link.java | 8 ++--- .../links/serializer/Deserializer.java | 4 +-- .../links/serializer/Serializer.java | 4 +-- .../components/links/tasks/UnpressTask.java | 2 +- .../components/shulker/AliShulkerModule.java | 15 ++++++++++ .../shulker/commands/AliShulker.java | 2 +- .../modules/events/uhc/UHCMatch.java | 2 +- .../modules/events/uhc/UHCModule.java | 5 ++-- .../modules/events/uhc/commands/AddToUHC.java | 4 ++- .../magictrick/aliarrow/AliArrowListener.java | 2 +- .../magictrick/aliarrow/AliArrowModule.java | 6 ++-- .../magictrick/aliarrow/AliArrowTask.java | 2 +- 29 files changed, 133 insertions(+), 110 deletions(-) create mode 100644 src/alisolarflare/modules/components/gpowers/GPowerModule.java create mode 100644 src/alisolarflare/modules/components/shulker/AliShulkerModule.java diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java index 9c82e32..6384f76 100644 --- a/src/alisolarflare/AliPresents.java +++ b/src/alisolarflare/AliPresents.java @@ -6,15 +6,8 @@ import org.bukkit.plugin.PluginDescriptionFile; //import alisolarflare.links.AliLinkSubPlug; import org.bukkit.plugin.java.JavaPlugin; -import alisolarflare.magictrick.aliarrow.AliArrowSubPlugin; -import alisolarflare.tools.flairdoors.FlairMe; -import alisolarflare.tools.flairdoors.PortalListener; -import alisolarflare.tools.flairdoors.SetFlairDoorColour; -import alisolarflare.tools.gpowers.gPowerCommand; -import alisolarflare.tools.gpowers.commands.PowerDown; -import alisolarflare.tools.gpowers.commands.PowerUp; -import alisolarflare.tools.gpowers.listeners.gPowerListener; -import alisolarflare.tools.shulker.AliShulker; +import alisolarflare.modules.components.flairdoor.listeners.PortalListener; +import alisolarflare.modules.magictrick.aliarrow.AliArrowModule; public class AliPresents extends JavaPlugin{ public void onEnable(){ @@ -25,7 +18,6 @@ public class AliPresents extends JavaPlugin{ logger.info(pdfFile.getName() + " has been started (V." + pdfFile.getVersion()+ ")."); registerModules(); - registerCommands(); registerEvents(); logger.info(pdfFile.getName() + " has fully registered (V." + pdfFile.getVersion()+ ")."); @@ -33,23 +25,8 @@ public class AliPresents extends JavaPlugin{ } private void registerEvents() { - getServer().getPluginManager().registerEvents(new PortalListener(this), this); - getServer().getPluginManager().registerEvents(new gPowerListener(this), this); } public void registerModules(){ - new AliArrowSubPlugin(this).register(); - - - //AliLinkSubPlug alilinksubplugin = new AliLinkSubPlug(this); - //alilinksubplugin.register(); - } - public void registerCommands(){ - getCommand("powerup").setExecutor(new PowerUp()); - getCommand("powerdown").setExecutor(new PowerDown()); - getCommand("gpowercommand").setExecutor(new gPowerCommand()); - getCommand("flairme").setExecutor(new FlairMe()); - getCommand("alishulker").setExecutor(new AliShulker()); - getCommand("setflairdoorcolour").setExecutor(new SetFlairDoorColour()); - + new AliArrowModule(this).register(); } } diff --git a/src/alisolarflare/modules/Module.java b/src/alisolarflare/modules/Module.java index af580b5..a68d1f6 100644 --- a/src/alisolarflare/modules/Module.java +++ b/src/alisolarflare/modules/Module.java @@ -1,11 +1,9 @@ -package alisolarflare; +package alisolarflare.modules; import org.bukkit.command.CommandExecutor; import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; -import alisolarflare.magictrick.aliarrow.AliArrowListener; - /** * A Module class is a helper class that allows the compacting of projects into one single package. * Each feature, whether game, arrow trail listener, or command tool, can have its command and listener diff --git a/src/alisolarflare/modules/Registerable.java b/src/alisolarflare/modules/Registerable.java index 22cf3a0..052a4e9 100644 --- a/src/alisolarflare/modules/Registerable.java +++ b/src/alisolarflare/modules/Registerable.java @@ -1,4 +1,4 @@ -package alisolarflare; +package alisolarflare.modules; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/alisolarflare/modules/components/flairdoor/FlairDoorModule.java b/src/alisolarflare/modules/components/flairdoor/FlairDoorModule.java index 1fea366..a7de4c9 100644 --- a/src/alisolarflare/modules/components/flairdoor/FlairDoorModule.java +++ b/src/alisolarflare/modules/components/flairdoor/FlairDoorModule.java @@ -1,22 +1,23 @@ -package alisolarflare.tools.flairdoors; +package alisolarflare.modules.components.flairdoor; -import alisolarflare.AliPresents; +import org.bukkit.plugin.java.JavaPlugin; -public class FlairDoorsSubPlug{ +import alisolarflare.modules.Module; +import alisolarflare.modules.components.flairdoor.commands.FlairMe; +import alisolarflare.modules.components.flairdoor.commands.SetFlairDoorColour; +import alisolarflare.modules.components.flairdoor.listeners.PortalListener; + +public class FlairDoorModule extends Module{ @SuppressWarnings("unused") - private AliPresents plugin; - public FlairDoorsSubPlug(AliPresents plugin){ + private JavaPlugin plugin; + public FlairDoorModule(JavaPlugin plugin){ this.plugin = plugin; } - public void register(){ - registerCommands(); - registerEvents(); - } - private void registerCommands() { - //plugin.getCommand("FlairMe").setExecutor(new FlairMe()); - } - private void registerEvents() { - // TODO Auto-generated method stub + @Override + public void register(JavaPlugin plugin) { + plugin.getCommand("flairme").setExecutor(new FlairMe()); + plugin.getCommand("setflairdoorcolour").setExecutor(new SetFlairDoorColour()); + plugin.getServer().getPluginManager().registerEvents(new PortalListener(plugin), plugin); } } diff --git a/src/alisolarflare/modules/components/flairdoor/commands/FlairMe.java b/src/alisolarflare/modules/components/flairdoor/commands/FlairMe.java index 49e04fb..5b10c0c 100644 --- a/src/alisolarflare/modules/components/flairdoor/commands/FlairMe.java +++ b/src/alisolarflare/modules/components/flairdoor/commands/FlairMe.java @@ -1,9 +1,11 @@ -package alisolarflare.tools.flairdoors; +package alisolarflare.modules.components.flairdoor.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; +import alisolarflare.modules.components.flairdoor.listeners.PortalListener; + public class FlairMe implements CommandExecutor{ @Override diff --git a/src/alisolarflare/modules/components/flairdoor/commands/SetFlairDoorColour.java b/src/alisolarflare/modules/components/flairdoor/commands/SetFlairDoorColour.java index 965acf5..686350f 100644 --- a/src/alisolarflare/modules/components/flairdoor/commands/SetFlairDoorColour.java +++ b/src/alisolarflare/modules/components/flairdoor/commands/SetFlairDoorColour.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.flairdoors; +package alisolarflare.modules.components.flairdoor.commands; import java.util.Arrays; import java.util.List; diff --git a/src/alisolarflare/modules/components/flairdoor/listeners/PortalListener.java b/src/alisolarflare/modules/components/flairdoor/listeners/PortalListener.java index 887697b..abf5e07 100644 --- a/src/alisolarflare/modules/components/flairdoor/listeners/PortalListener.java +++ b/src/alisolarflare/modules/components/flairdoor/listeners/PortalListener.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.flairdoors; +package alisolarflare.modules.components.flairdoor.listeners; import java.util.AbstractMap; import java.util.ArrayList; @@ -15,18 +15,17 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerPortalEvent; import org.bukkit.material.MaterialData; import org.bukkit.material.Wool; - -import alisolarflare.AliPresents; +import org.bukkit.plugin.java.JavaPlugin; public class PortalListener implements Listener{ AbstractMap portalMap = new HashMap(); public static List playersToBeFlaired = new ArrayList(); - public AliPresents plugin; + public JavaPlugin plugin; //TODO: CREATE - LIST OF PORTALS (only x-z values) - public PortalListener(AliPresents plugin) { + public PortalListener(JavaPlugin plugin) { this.plugin = plugin; } @EventHandler diff --git a/src/alisolarflare/modules/components/gpowers/GPowerModule.java b/src/alisolarflare/modules/components/gpowers/GPowerModule.java new file mode 100644 index 0000000..8578d46 --- /dev/null +++ b/src/alisolarflare/modules/components/gpowers/GPowerModule.java @@ -0,0 +1,22 @@ +package alisolarflare.modules.components.gpowers; + +import org.bukkit.plugin.java.JavaPlugin; + +import alisolarflare.modules.Module; +import alisolarflare.modules.components.gpowers.commands.PowerDown; +import alisolarflare.modules.components.gpowers.commands.PowerUp; +import alisolarflare.modules.components.gpowers.commands.gPowerCommand; +import alisolarflare.modules.components.gpowers.listeners.gPowerListener; + +public class GPowerModule extends Module{ + + @Override + public void register(JavaPlugin plugin) { + plugin.getCommand("powerup").setExecutor(new PowerUp()); + plugin.getCommand("powerdown").setExecutor(new PowerDown()); + plugin.getCommand("gpowercommand").setExecutor(new gPowerCommand()); + + plugin.getServer().getPluginManager().registerEvents(new gPowerListener(plugin), plugin); + } + +} diff --git a/src/alisolarflare/modules/components/gpowers/commands/PowerDown.java b/src/alisolarflare/modules/components/gpowers/commands/PowerDown.java index bcdc714..d7c42e3 100644 --- a/src/alisolarflare/modules/components/gpowers/commands/PowerDown.java +++ b/src/alisolarflare/modules/components/gpowers/commands/PowerDown.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.gpowers.commands; +package alisolarflare.modules.components.gpowers.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/alisolarflare/modules/components/gpowers/commands/PowerUp.java b/src/alisolarflare/modules/components/gpowers/commands/PowerUp.java index c89fcd5..3668d8d 100644 --- a/src/alisolarflare/modules/components/gpowers/commands/PowerUp.java +++ b/src/alisolarflare/modules/components/gpowers/commands/PowerUp.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.gpowers.commands; +package alisolarflare.modules.components.gpowers.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/alisolarflare/modules/components/gpowers/commands/gPowerCommand.java b/src/alisolarflare/modules/components/gpowers/commands/gPowerCommand.java index 2170d8c..b9b105e 100644 --- a/src/alisolarflare/modules/components/gpowers/commands/gPowerCommand.java +++ b/src/alisolarflare/modules/components/gpowers/commands/gPowerCommand.java @@ -1,10 +1,12 @@ -package alisolarflare.tools.gpowers; +package alisolarflare.modules.components.gpowers.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import alisolarflare.modules.components.gpowers.gPowerMemory; + public class gPowerCommand implements CommandExecutor{ @Override diff --git a/src/alisolarflare/modules/components/gpowers/gPowerMemory.java b/src/alisolarflare/modules/components/gpowers/gPowerMemory.java index 56c9a58..afc9208 100644 --- a/src/alisolarflare/modules/components/gpowers/gPowerMemory.java +++ b/src/alisolarflare/modules/components/gpowers/gPowerMemory.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.gpowers; +package alisolarflare.modules.components.gpowers; import java.util.HashMap; import java.util.Map; diff --git a/src/alisolarflare/modules/components/gpowers/listeners/gPowerApplyingTask.java b/src/alisolarflare/modules/components/gpowers/listeners/gPowerApplyingTask.java index 63d1676..a13a19d 100644 --- a/src/alisolarflare/modules/components/gpowers/listeners/gPowerApplyingTask.java +++ b/src/alisolarflare/modules/components/gpowers/listeners/gPowerApplyingTask.java @@ -1,19 +1,19 @@ -package alisolarflare.tools.gpowers.listeners; +package alisolarflare.modules.components.gpowers.listeners; import org.bukkit.Color; import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.scheduler.BukkitRunnable; -import alisolarflare.AliPresents; -import alisolarflare.tools.gpowers.gPowerMemory; +import alisolarflare.modules.components.gpowers.gPowerMemory; public class gPowerApplyingTask extends BukkitRunnable{ - private AliPresents plugin; + private JavaPlugin plugin; - public gPowerApplyingTask(AliPresents plugin) { + public gPowerApplyingTask(JavaPlugin plugin) { this.plugin = plugin; } diff --git a/src/alisolarflare/modules/components/gpowers/listeners/gPowerListener.java b/src/alisolarflare/modules/components/gpowers/listeners/gPowerListener.java index bca5927..1892244 100644 --- a/src/alisolarflare/modules/components/gpowers/listeners/gPowerListener.java +++ b/src/alisolarflare/modules/components/gpowers/listeners/gPowerListener.java @@ -1,15 +1,15 @@ -package alisolarflare.tools.gpowers.listeners; +package alisolarflare.modules.components.gpowers.listeners; import org.bukkit.event.Listener; +import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitTask; -import alisolarflare.AliPresents; - public class gPowerListener implements Listener{ - private AliPresents plugin; + private JavaPlugin plugin; public gPowerApplyingTask powerApplyingTask; public BukkitTask bukkitTask; - public gPowerListener(AliPresents plugin){ + + public gPowerListener(JavaPlugin plugin){ this.plugin = plugin; this.powerApplyingTask = new gPowerApplyingTask(this.plugin); bukkitTask = powerApplyingTask.runTaskTimer(plugin, 190, 190); diff --git a/src/alisolarflare/modules/components/links/AliLinkModule.java b/src/alisolarflare/modules/components/links/AliLinkModule.java index c85db53..23ce869 100644 --- a/src/alisolarflare/modules/components/links/AliLinkModule.java +++ b/src/alisolarflare/modules/components/links/AliLinkModule.java @@ -1,22 +1,25 @@ -package alisolarflare.tools.links; +package alisolarflare.modules.components.links; import java.util.List; -import alisolarflare.AliPresents; -import alisolarflare.tools.links.commands.PressAliLink; -import alisolarflare.tools.links.commands.SetAliLink; -import alisolarflare.tools.links.entities.Link; +import org.bukkit.plugin.java.JavaPlugin; -public class AliLinkSubPlug{ - public AliPresents plugin; +import alisolarflare.modules.Module; +import alisolarflare.modules.components.links.commands.PressAliLink; +import alisolarflare.modules.components.links.commands.SetAliLink; +import alisolarflare.modules.components.links.entities.Link; + +public class AliLinkModule extends Module{ + public JavaPlugin plugin; private SetAliLink setAliLink; - public AliLinkSubPlug(AliPresents plugin){ + public AliLinkModule(JavaPlugin plugin){ this.plugin = plugin; } - public void register(){ - setAliLink = new SetAliLink(this.plugin); + @Override + public void register(JavaPlugin plugin){ + setAliLink = new SetAliLink(plugin); plugin.getCommand("setalilink").setExecutor(setAliLink); plugin.getCommand("pressalilink").setExecutor(new PressAliLink(this, setAliLink)); @@ -29,4 +32,5 @@ public class AliLinkSubPlug{ return (List) plugin.getConfig().getList("aliLinkList"); } + } diff --git a/src/alisolarflare/modules/components/links/commands/PressAliLink.java b/src/alisolarflare/modules/components/links/commands/PressAliLink.java index e8ec607..b062149 100644 --- a/src/alisolarflare/modules/components/links/commands/PressAliLink.java +++ b/src/alisolarflare/modules/components/links/commands/PressAliLink.java @@ -1,23 +1,23 @@ -package alisolarflare.tools.links.commands; +package alisolarflare.modules.components.links.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; -import alisolarflare.tools.links.AliLinkSubPlug; -import alisolarflare.tools.links.entities.Link; +import alisolarflare.modules.components.links.AliLinkModule; +import alisolarflare.modules.components.links.entities.Link; public class PressAliLink implements CommandExecutor{ - private AliLinkSubPlug subplugin; + private AliLinkModule module; private SetAliLink setAliLink; - public PressAliLink(AliLinkSubPlug subplugin, SetAliLink setAliLink){ - this.subplugin = subplugin; + public PressAliLink(AliLinkModule subplugin, SetAliLink setAliLink){ + this.module = subplugin; this.setAliLink = setAliLink; } @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { - subplugin.plugin.getServer().broadcastMessage(setAliLink.linkList.toString() + "over."); + module.plugin.getServer().broadcastMessage(setAliLink.linkList.toString() + "over."); if (args.length < 1){ sender.sendMessage("You must specify a link frequency"); @@ -26,7 +26,7 @@ public class PressAliLink implements CommandExecutor{ for (Link link: setAliLink.linkList){ for (String inputlink: args){ if(inputlink.equals(link.frequency)){ - link.press(subplugin); + link.press(module); } } } diff --git a/src/alisolarflare/modules/components/links/commands/SetAliLink.java b/src/alisolarflare/modules/components/links/commands/SetAliLink.java index 4d5f74a..ec3083d 100644 --- a/src/alisolarflare/modules/components/links/commands/SetAliLink.java +++ b/src/alisolarflare/modules/components/links/commands/SetAliLink.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.links.commands; +package alisolarflare.modules.components.links.commands; import java.util.ArrayList; @@ -10,10 +10,10 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; -import alisolarflare.AliPresents; -import alisolarflare.tools.links.AliLinkSubPlug; -import alisolarflare.tools.links.entities.Link; +import alisolarflare.modules.components.links.AliLinkModule; +import alisolarflare.modules.components.links.entities.Link; /** * This class manages the command /SetAliLink [x] [y] [z]. This command creates an Ali-Link, @@ -26,14 +26,14 @@ import alisolarflare.tools.links.entities.Link; */ public class SetAliLink implements CommandExecutor{ public List linkList = new ArrayList(); - AliLinkSubPlug subplugin; - private AliPresents plugin; + AliLinkModule subplugin; + private JavaPlugin plugin; /** * Constructs the SetAliLink class - * @param plugin The plugin that contains the configuration file of AliPresents + * @param plugin The plugin that contains the configuration file of SetAliLink */ - public SetAliLink(AliPresents plugin){ + public SetAliLink(JavaPlugin plugin){ this.plugin = plugin; load(); } diff --git a/src/alisolarflare/modules/components/links/entities/Link.java b/src/alisolarflare/modules/components/links/entities/Link.java index d9868b5..a5bd186 100644 --- a/src/alisolarflare/modules/components/links/entities/Link.java +++ b/src/alisolarflare/modules/components/links/entities/Link.java @@ -1,12 +1,12 @@ -package alisolarflare.tools.links.entities; +package alisolarflare.modules.components.links.entities; import java.io.Serializable; import org.bukkit.Location; import org.bukkit.Material; -import alisolarflare.tools.links.AliLinkSubPlug; -import alisolarflare.tools.links.tasks.UnpressTask; +import alisolarflare.modules.components.links.AliLinkModule; +import alisolarflare.modules.components.links.tasks.UnpressTask; public class Link implements Serializable{ /** @@ -28,7 +28,7 @@ public class Link implements Serializable{ this.z = "" + location.getBlockZ(); //plugin.plugin.getConfig().set("frequency", 10); } - public void press(AliLinkSubPlug plugin) { + public void press(AliLinkModule plugin) { Location location = new Location(plugin.plugin.getServer().getWorld(world), Integer.parseInt(x), Integer.parseInt(y), Integer.parseInt(z)); location.getBlock().setType(Material.REDSTONE_BLOCK); UnpressTask unPressTask = new UnpressTask(location); diff --git a/src/alisolarflare/modules/components/links/serializer/Deserializer.java b/src/alisolarflare/modules/components/links/serializer/Deserializer.java index 7aacfb8..ff4c1fe 100644 --- a/src/alisolarflare/modules/components/links/serializer/Deserializer.java +++ b/src/alisolarflare/modules/components/links/serializer/Deserializer.java @@ -1,11 +1,11 @@ -package alisolarflare.tools.links.serializer; +package alisolarflare.modules.components.links.serializer; import java.io.FileInputStream; import java.io.ObjectInputStream; import java.util.List; -import alisolarflare.tools.links.entities.Link; +import alisolarflare.modules.components.links.entities.Link; public class Deserializer{ diff --git a/src/alisolarflare/modules/components/links/serializer/Serializer.java b/src/alisolarflare/modules/components/links/serializer/Serializer.java index 20b9daa..359e95a 100644 --- a/src/alisolarflare/modules/components/links/serializer/Serializer.java +++ b/src/alisolarflare/modules/components/links/serializer/Serializer.java @@ -1,11 +1,11 @@ -package alisolarflare.tools.links.serializer; +package alisolarflare.modules.components.links.serializer; import java.io.FileOutputStream; import java.io.ObjectOutputStream; import java.util.List; -import alisolarflare.tools.links.entities.Link; +import alisolarflare.modules.components.links.entities.Link; public class Serializer { diff --git a/src/alisolarflare/modules/components/links/tasks/UnpressTask.java b/src/alisolarflare/modules/components/links/tasks/UnpressTask.java index 79a457c..4eed62a 100644 --- a/src/alisolarflare/modules/components/links/tasks/UnpressTask.java +++ b/src/alisolarflare/modules/components/links/tasks/UnpressTask.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.links.tasks; +package alisolarflare.modules.components.links.tasks; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/alisolarflare/modules/components/shulker/AliShulkerModule.java b/src/alisolarflare/modules/components/shulker/AliShulkerModule.java new file mode 100644 index 0000000..97f2e31 --- /dev/null +++ b/src/alisolarflare/modules/components/shulker/AliShulkerModule.java @@ -0,0 +1,15 @@ +package alisolarflare.modules.components.shulker; + +import org.bukkit.plugin.java.JavaPlugin; + +import alisolarflare.modules.Module; +import alisolarflare.modules.components.shulker.commands.AliShulker; + +public class AliShulkerModule extends Module{ + + @Override + public void register(JavaPlugin plugin) { + plugin.getCommand("alishulker").setExecutor(new AliShulker()); + } + +} diff --git a/src/alisolarflare/modules/components/shulker/commands/AliShulker.java b/src/alisolarflare/modules/components/shulker/commands/AliShulker.java index 0bd2534..cc802c6 100644 --- a/src/alisolarflare/modules/components/shulker/commands/AliShulker.java +++ b/src/alisolarflare/modules/components/shulker/commands/AliShulker.java @@ -1,4 +1,4 @@ -package alisolarflare.tools.shulker; +package alisolarflare.modules.components.shulker.commands; import org.bukkit.Location; import org.bukkit.command.Command; diff --git a/src/alisolarflare/modules/events/uhc/UHCMatch.java b/src/alisolarflare/modules/events/uhc/UHCMatch.java index e9a078d..f8aa26c 100644 --- a/src/alisolarflare/modules/events/uhc/UHCMatch.java +++ b/src/alisolarflare/modules/events/uhc/UHCMatch.java @@ -1,4 +1,4 @@ -package alisolarflare.events.uhc; +package alisolarflare.modules.events.uhc; import java.util.ArrayList; import java.util.List; diff --git a/src/alisolarflare/modules/events/uhc/UHCModule.java b/src/alisolarflare/modules/events/uhc/UHCModule.java index 8acaf0e..35dd1a2 100644 --- a/src/alisolarflare/modules/events/uhc/UHCModule.java +++ b/src/alisolarflare/modules/events/uhc/UHCModule.java @@ -1,8 +1,9 @@ -package alisolarflare.events.uhc; +package alisolarflare.modules.events.uhc; import org.bukkit.plugin.java.JavaPlugin; -import alisolarflare.Module; +import alisolarflare.modules.Module; +import alisolarflare.modules.events.uhc.commands.AddToUHC; public class UHCModule extends Module { public UHCMatch generalMemory; diff --git a/src/alisolarflare/modules/events/uhc/commands/AddToUHC.java b/src/alisolarflare/modules/events/uhc/commands/AddToUHC.java index 2abc2c4..02a90cf 100644 --- a/src/alisolarflare/modules/events/uhc/commands/AddToUHC.java +++ b/src/alisolarflare/modules/events/uhc/commands/AddToUHC.java @@ -1,10 +1,12 @@ -package alisolarflare.events.uhc; +package alisolarflare.modules.events.uhc.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import alisolarflare.modules.events.uhc.UHCMatch; + /** * This class handles the specific command /addToUHC which, in-game, * adds a player to a specific UltraHardcore match, that is defined diff --git a/src/alisolarflare/modules/magictrick/aliarrow/AliArrowListener.java b/src/alisolarflare/modules/magictrick/aliarrow/AliArrowListener.java index 12227b1..2d009b4 100644 --- a/src/alisolarflare/modules/magictrick/aliarrow/AliArrowListener.java +++ b/src/alisolarflare/modules/magictrick/aliarrow/AliArrowListener.java @@ -1,4 +1,4 @@ -package alisolarflare.magictrick.aliarrow; +package alisolarflare.modules.magictrick.aliarrow; import org.bukkit.entity.Arrow; import org.bukkit.entity.EntityType; diff --git a/src/alisolarflare/modules/magictrick/aliarrow/AliArrowModule.java b/src/alisolarflare/modules/magictrick/aliarrow/AliArrowModule.java index 05d63c3..2de4069 100644 --- a/src/alisolarflare/modules/magictrick/aliarrow/AliArrowModule.java +++ b/src/alisolarflare/modules/magictrick/aliarrow/AliArrowModule.java @@ -1,12 +1,12 @@ -package alisolarflare.magictrick.aliarrow; +package alisolarflare.modules.magictrick.aliarrow; import java.util.logging.Level; import alisolarflare.AliPresents; -public class AliArrowSubPlugin { +public class AliArrowModule { private AliPresents plugin; - public AliArrowSubPlugin(AliPresents plugin){ + public AliArrowModule(AliPresents plugin){ this.plugin = plugin; } /** diff --git a/src/alisolarflare/modules/magictrick/aliarrow/AliArrowTask.java b/src/alisolarflare/modules/magictrick/aliarrow/AliArrowTask.java index e52f984..b032db1 100644 --- a/src/alisolarflare/modules/magictrick/aliarrow/AliArrowTask.java +++ b/src/alisolarflare/modules/magictrick/aliarrow/AliArrowTask.java @@ -1,4 +1,4 @@ -package alisolarflare.magictrick.aliarrow; +package alisolarflare.modules.magictrick.aliarrow; import org.bukkit.Particle; import org.bukkit.entity.Arrow;