From b398fe0e33bda6a48ff183cd9a2895df2e952b79 Mon Sep 17 00:00:00 2001 From: AliLaptop Date: Sat, 25 Jun 2016 20:49:33 -0400 Subject: [PATCH] Refactored Package and Class Names --- src/buttondevteam/MainPlugin.java | 25 ++++++++++-------- .../discordbot/DiscordSubPlugin.java | 26 +++++++++++++++++++ .../discordbot/commands/Discord.java | 5 ++++ .../discordbot/helpers/DiscordBotLink.java | 16 ++++++++++++ .../listeners/PrivateMessageListener.java | 5 ++++ .../alisolarflare/iiewar/IieWarSubPlugin.java | 25 ++++++++++++++++++ .../iiewar/commands/ToggleWar.java | 5 ++++ .../iiewar/helpers/WarListManager.java | 16 ++++++++++++ .../iiewar/listeners/CreativeListener.java | 5 ++++ .../iiewar/listeners/ObsidianListener.java | 5 ++++ .../iiewar/listeners/SpawnEggListener.java | 5 ++++ .../iiewar/listeners/TeleportListener.java | 5 ++++ 12 files changed, 132 insertions(+), 11 deletions(-) create mode 100644 src/buttondevteam/alisolarflare/discordbot/DiscordSubPlugin.java create mode 100644 src/buttondevteam/alisolarflare/discordbot/commands/Discord.java create mode 100644 src/buttondevteam/alisolarflare/discordbot/helpers/DiscordBotLink.java create mode 100644 src/buttondevteam/alisolarflare/discordbot/listeners/PrivateMessageListener.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/IieWarSubPlugin.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/commands/ToggleWar.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/helpers/WarListManager.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/listeners/CreativeListener.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/listeners/ObsidianListener.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/listeners/SpawnEggListener.java create mode 100644 src/buttondevteam/alisolarflare/iiewar/listeners/TeleportListener.java diff --git a/src/buttondevteam/MainPlugin.java b/src/buttondevteam/MainPlugin.java index 155ea56..39b8325 100644 --- a/src/buttondevteam/MainPlugin.java +++ b/src/buttondevteam/MainPlugin.java @@ -5,19 +5,21 @@ import java.util.logging.Logger; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; -import buttondevteam.alisolarflare.aliarrowtrail.AliArrowListener; +import buttondevteam.alisolarflare.discordbot.DiscordSubPlugin; +import buttondevteam.alisolarflare.iiewar.IieWarSubPlugin; public class MainPlugin extends JavaPlugin{ private PluginDescriptionFile pdfFile; private Logger logger; - private AliArrowListener aliArrowListener; - + private DiscordSubPlugin discordSubPlugin; + private IieWarSubPlugin iieWarSubPlugin; public void onEnable(){ //Logs "Plugin Enabled", registers commands pdfFile = getDescription(); logger = getLogger(); logger.info(pdfFile.getName() + " has been started (V." + pdfFile.getVersion()+ ")."); - + + registerSubPlugins(); registerCommands(); registerEvents(); @@ -26,16 +28,17 @@ public class MainPlugin extends JavaPlugin{ public void onDisable(){ logger.info(pdfFile.getName() + " has been Disabled (V." + pdfFile.getVersion()+ ")."); } + public void registerSubPlugins(){ + discordSubPlugin = new DiscordSubPlugin(this); + iieWarSubPlugin = new IieWarSubPlugin(this); + + discordSubPlugin.register(); + iieWarSubPlugin.register(); + } public void registerCommands(){ //Example command: getCommand("createShrine").setExecutor(new CreateShrine(this)); } - public void registerEvents(){ - //Example INIT: midnightListener = new MidnightListener(this); - //Example Event: getServer().getPluginManager().registerEvents(midnightListener, this); - - //INIT - aliArrowListener = new AliArrowListener(this); + public void registerEvents(){ //EVENTS - getServer().getPluginManager().registerEvents(aliArrowListener, this); } } diff --git a/src/buttondevteam/alisolarflare/discordbot/DiscordSubPlugin.java b/src/buttondevteam/alisolarflare/discordbot/DiscordSubPlugin.java new file mode 100644 index 0000000..39ad50b --- /dev/null +++ b/src/buttondevteam/alisolarflare/discordbot/DiscordSubPlugin.java @@ -0,0 +1,26 @@ +package buttondevteam.alisolarflare.discordbot; + +import java.util.logging.Level; + +import buttondevteam.MainPlugin; + +public class DiscordSubPlugin { + private MainPlugin plugin; + + public DiscordSubPlugin(MainPlugin plugin){ + this.plugin = plugin; + } + public void register(){ + registerEvents(); + registerCommands(); + plugin.getLogger().log(Level.INFO, "Discord Sub Plugin Registered!"); + } + private void registerEvents() { + + } + + private void registerCommands() { + // TODO Auto-generated method stub + + } +} diff --git a/src/buttondevteam/alisolarflare/discordbot/commands/Discord.java b/src/buttondevteam/alisolarflare/discordbot/commands/Discord.java new file mode 100644 index 0000000..45378c0 --- /dev/null +++ b/src/buttondevteam/alisolarflare/discordbot/commands/Discord.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.discordbot.commands; + +public class Discord { + +} diff --git a/src/buttondevteam/alisolarflare/discordbot/helpers/DiscordBotLink.java b/src/buttondevteam/alisolarflare/discordbot/helpers/DiscordBotLink.java new file mode 100644 index 0000000..0970db3 --- /dev/null +++ b/src/buttondevteam/alisolarflare/discordbot/helpers/DiscordBotLink.java @@ -0,0 +1,16 @@ +package buttondevteam.alisolarflare.discordbot.helpers; + +public class DiscordBotLink { + public void setRoleAsMinecraft(){ + + } + public void unsetRoleAsMinecraft(){ + + } + public void setRoleAsFlair(){ + + } + public void unsetRoleAsFlair(){ + + } +} diff --git a/src/buttondevteam/alisolarflare/discordbot/listeners/PrivateMessageListener.java b/src/buttondevteam/alisolarflare/discordbot/listeners/PrivateMessageListener.java new file mode 100644 index 0000000..ba4e615 --- /dev/null +++ b/src/buttondevteam/alisolarflare/discordbot/listeners/PrivateMessageListener.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.discordbot.listeners; + +public class PrivateMessageListener { + +} diff --git a/src/buttondevteam/alisolarflare/iiewar/IieWarSubPlugin.java b/src/buttondevteam/alisolarflare/iiewar/IieWarSubPlugin.java new file mode 100644 index 0000000..382d1c8 --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/IieWarSubPlugin.java @@ -0,0 +1,25 @@ +package buttondevteam.alisolarflare.iiewar; + +import java.util.logging.Level; + +import buttondevteam.MainPlugin; + +public class IieWarSubPlugin { + private MainPlugin plugin; + public IieWarSubPlugin(MainPlugin plugin){ + this.plugin = plugin; + } + public void register(){ + registerEvents(); + registerCommands(); + plugin.getLogger().log(Level.INFO, "Discord Sub Plugin Registered!"); + } + private void registerEvents() { + + } + + private void registerCommands() { + // TODO Auto-generated method stub + + } +} diff --git a/src/buttondevteam/alisolarflare/iiewar/commands/ToggleWar.java b/src/buttondevteam/alisolarflare/iiewar/commands/ToggleWar.java new file mode 100644 index 0000000..206612e --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/commands/ToggleWar.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.iiewar.commands; + +public class ToggleWar { + +} diff --git a/src/buttondevteam/alisolarflare/iiewar/helpers/WarListManager.java b/src/buttondevteam/alisolarflare/iiewar/helpers/WarListManager.java new file mode 100644 index 0000000..d7d30ec --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/helpers/WarListManager.java @@ -0,0 +1,16 @@ +package buttondevteam.alisolarflare.iiewar.helpers; + +import org.bukkit.entity.Player; + +public class WarListManager { + public void createWarList(){ + //stub + } + public void LoadWarList(){ + //stub + } + public boolean isOnList(Player player){ + return false; + //stub + } +} \ No newline at end of file diff --git a/src/buttondevteam/alisolarflare/iiewar/listeners/CreativeListener.java b/src/buttondevteam/alisolarflare/iiewar/listeners/CreativeListener.java new file mode 100644 index 0000000..80b97cb --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/listeners/CreativeListener.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.iiewar.listeners; + +public class CreativeListener { + +} diff --git a/src/buttondevteam/alisolarflare/iiewar/listeners/ObsidianListener.java b/src/buttondevteam/alisolarflare/iiewar/listeners/ObsidianListener.java new file mode 100644 index 0000000..1671c8e --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/listeners/ObsidianListener.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.iiewar.listeners; + +public class ObsidianListener { + +} diff --git a/src/buttondevteam/alisolarflare/iiewar/listeners/SpawnEggListener.java b/src/buttondevteam/alisolarflare/iiewar/listeners/SpawnEggListener.java new file mode 100644 index 0000000..5ae5b1f --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/listeners/SpawnEggListener.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.iiewar.listeners; + +public class SpawnEggListener { + +} diff --git a/src/buttondevteam/alisolarflare/iiewar/listeners/TeleportListener.java b/src/buttondevteam/alisolarflare/iiewar/listeners/TeleportListener.java new file mode 100644 index 0000000..1a6c102 --- /dev/null +++ b/src/buttondevteam/alisolarflare/iiewar/listeners/TeleportListener.java @@ -0,0 +1,5 @@ +package buttondevteam.alisolarflare.iiewar.listeners; + +public class TeleportListener { + +}