From 1c1e30837598a12cf7a25f6a19672bc7e6f8b440 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 28 Dec 2017 12:59:29 -0500 Subject: [PATCH] Refactoring - Moved components into new folder --- .classpath | 9 +--- .../java/buttondevteam/presents/Main.java | 6 +-- .../dictionary/DictionaryComponent.java | 51 +++++++++++++++++++ .../dictionary/commands/SendJSON.java | 2 +- .../dictionary/commands/SendMessage.java | 2 +- .../dictionary/config/LoadConfig.java | 2 +- .../dictionary/config/SaveConfig.java | 2 +- .../dictionary/config/TimePersistence.java | 2 +- .../dictionary/copy/DictionaryComponent.java | 51 +++++++++++++++++++ .../dictionary/effects/Bedsplode.java | 2 +- .../dictionary/pages/DataPage.java | 2 +- .../dictionary/pages/HelloPage.java | 2 +- .../dictionary/pages/JSONPage.java | 2 +- .../dictionary/pages/LocationPage.java | 2 +- .../dictionary/pages/POSTPage.java | 2 +- .../dictionary/pages/PlayersOnlinePage.java | 2 +- .../dictionary/spawning/PlaySound.java | 2 +- .../dictionary/spawning/SetBlock.java | 2 +- .../dictionary/spawning/SpawnCow.java | 2 +- .../dictionary/spawning/SpawnItem.java | 2 +- .../dictionary/spawning/SpawnMagicPotato.java | 2 +- .../dictionary/spawning/SpawnParticle.java | 2 +- .../dungeon/DungeonComponent.java | 2 +- .../dungeon/DungeonCreate.java | 2 +- .../dungeon/DungeonDelete.java | 2 +- .../magic/MagicComponent.java | 13 ++--- .../magic/tricks/AliArrowListener.java | 2 +- .../magic/tricks/AliArrowTask.java | 2 +- .../magic/tricks/BoomBowDeathListener.java | 2 +- .../magic/tricks/BoomBowListener.java | 2 +- .../magic/tricks/BoomBowRule.java | 2 +- .../magic/tricks/BoomDecayTask.java | 2 +- .../magic/tricks/CannonBowListener.java | 2 +- .../magic/tricks/CannonBowSettings.java | 2 +- .../research/ResearchComponent.java | 15 ++++++ .../{ => components}/spawn/ChooseColor.java | 2 +- .../spawn/SpawnComponent.java | 2 +- .../dictionary/DictionaryComponent.java | 51 ------------------- 38 files changed, 159 insertions(+), 99 deletions(-) create mode 100644 src/main/java/buttondevteam/presents/components/dictionary/DictionaryComponent.java rename src/main/java/buttondevteam/presents/{ => components}/dictionary/commands/SendJSON.java (91%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/commands/SendMessage.java (86%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/config/LoadConfig.java (91%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/config/SaveConfig.java (92%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/config/TimePersistence.java (95%) create mode 100644 src/main/java/buttondevteam/presents/components/dictionary/copy/DictionaryComponent.java rename src/main/java/buttondevteam/presents/{ => components}/dictionary/effects/Bedsplode.java (92%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/pages/DataPage.java (88%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/pages/HelloPage.java (85%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/pages/JSONPage.java (92%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/pages/LocationPage.java (95%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/pages/POSTPage.java (94%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/pages/PlayersOnlinePage.java (93%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/spawning/PlaySound.java (94%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/spawning/SetBlock.java (89%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/spawning/SpawnCow.java (88%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/spawning/SpawnItem.java (89%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/spawning/SpawnMagicPotato.java (94%) rename src/main/java/buttondevteam/presents/{ => components}/dictionary/spawning/SpawnParticle.java (88%) rename src/main/java/buttondevteam/presents/{ => components}/dungeon/DungeonComponent.java (86%) rename src/main/java/buttondevteam/presents/{ => components}/dungeon/DungeonCreate.java (96%) rename src/main/java/buttondevteam/presents/{ => components}/dungeon/DungeonDelete.java (95%) rename src/main/java/buttondevteam/presents/{ => components}/magic/MagicComponent.java (52%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/AliArrowListener.java (91%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/AliArrowTask.java (91%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/BoomBowDeathListener.java (87%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/BoomBowListener.java (95%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/BoomBowRule.java (93%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/BoomDecayTask.java (85%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/CannonBowListener.java (99%) rename src/main/java/buttondevteam/presents/{ => components}/magic/tricks/CannonBowSettings.java (97%) create mode 100644 src/main/java/buttondevteam/presents/components/research/ResearchComponent.java rename src/main/java/buttondevteam/presents/{ => components}/spawn/ChooseColor.java (95%) rename src/main/java/buttondevteam/presents/{ => components}/spawn/SpawnComponent.java (84%) delete mode 100644 src/main/java/buttondevteam/presents/dictionary/DictionaryComponent.java diff --git a/.classpath b/.classpath index 9794c57..5d6da7d 100644 --- a/.classpath +++ b/.classpath @@ -17,18 +17,11 @@ - - - - - - - - + diff --git a/src/main/java/buttondevteam/presents/Main.java b/src/main/java/buttondevteam/presents/Main.java index 136f5a1..eb35921 100644 --- a/src/main/java/buttondevteam/presents/Main.java +++ b/src/main/java/buttondevteam/presents/Main.java @@ -5,9 +5,9 @@ import java.util.logging.Logger; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; -import buttondevteam.presents.dictionary.DictionaryComponent; -import buttondevteam.presents.magic.MagicComponent; -import buttondevteam.presents.spawn.SpawnComponent; +import buttondevteam.presents.components.dictionary.DictionaryComponent; +import buttondevteam.presents.components.magic.MagicComponent; +import buttondevteam.presents.components.spawn.SpawnComponent; public class Main extends JavaPlugin{ public void onEnable(){ diff --git a/src/main/java/buttondevteam/presents/components/dictionary/DictionaryComponent.java b/src/main/java/buttondevteam/presents/components/dictionary/DictionaryComponent.java new file mode 100644 index 0000000..1d986db --- /dev/null +++ b/src/main/java/buttondevteam/presents/components/dictionary/DictionaryComponent.java @@ -0,0 +1,51 @@ +package buttondevteam.presents.components.dictionary; + +import org.bukkit.plugin.java.JavaPlugin; + +import buttondevteam.presents.architecture.Component; +import buttondevteam.presents.components.dictionary.commands.SendJSON; +import buttondevteam.presents.components.dictionary.commands.SendMessage; +import buttondevteam.presents.components.dictionary.config.LoadConfig; +import buttondevteam.presents.components.dictionary.config.SaveConfig; +import buttondevteam.presents.components.dictionary.config.TimePersistence; +import buttondevteam.presents.components.dictionary.effects.Bedsplode; +import buttondevteam.presents.components.dictionary.pages.DataPage; +import buttondevteam.presents.components.dictionary.pages.HelloPage; +import buttondevteam.presents.components.dictionary.pages.JSONPage; +import buttondevteam.presents.components.dictionary.pages.LocationPage; +import buttondevteam.presents.components.dictionary.pages.POSTPage; +import buttondevteam.presents.components.dictionary.pages.PlayersOnlinePage; +import buttondevteam.presents.components.dictionary.spawning.PlaySound; +import buttondevteam.presents.components.dictionary.spawning.SetBlock; +import buttondevteam.presents.components.dictionary.spawning.SpawnCow; +import buttondevteam.presents.components.dictionary.spawning.SpawnItem; +import buttondevteam.presents.components.dictionary.spawning.SpawnMagicPotato; +import buttondevteam.presents.components.dictionary.spawning.SpawnParticle; + +public class DictionaryComponent extends Component{ + + @Override + public void register(JavaPlugin plugin) { + + this.registerCommand(plugin, new SendMessage()); + this.registerCommand(plugin, new SendJSON()); + this.registerCommand(plugin, new SaveConfig()); + this.registerCommand(plugin, new LoadConfig()); + this.registerCommand(plugin, new TimePersistence()); + + this.registerListener(plugin, new Bedsplode()); + this.registerCommand(plugin, new SpawnCow()); + this.registerCommand(plugin, new SpawnItem()); + this.registerCommand(plugin, new SpawnMagicPotato()); + this.registerCommand(plugin, new SetBlock()); + this.registerCommand(plugin, new SpawnParticle()); + this.registerCommand(plugin, new PlaySound()); + + this.addPage(plugin, new HelloPage()); + this.addPage(plugin, new DataPage()); + this.addPage(plugin, new PlayersOnlinePage(plugin)); + this.addPage(plugin, new LocationPage(plugin)); + this.addPage(plugin, new POSTPage(plugin)); + this.addPage(plugin, new JSONPage()); + } +} diff --git a/src/main/java/buttondevteam/presents/dictionary/commands/SendJSON.java b/src/main/java/buttondevteam/presents/components/dictionary/commands/SendJSON.java similarity index 91% rename from src/main/java/buttondevteam/presents/dictionary/commands/SendJSON.java rename to src/main/java/buttondevteam/presents/components/dictionary/commands/SendJSON.java index e27fa2e..75e71f8 100644 --- a/src/main/java/buttondevteam/presents/dictionary/commands/SendJSON.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/commands/SendJSON.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.commands; +package buttondevteam.presents.components.dictionary.commands; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dictionary/commands/SendMessage.java b/src/main/java/buttondevteam/presents/components/dictionary/commands/SendMessage.java similarity index 86% rename from src/main/java/buttondevteam/presents/dictionary/commands/SendMessage.java rename to src/main/java/buttondevteam/presents/components/dictionary/commands/SendMessage.java index c163cf2..b552de5 100644 --- a/src/main/java/buttondevteam/presents/dictionary/commands/SendMessage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/commands/SendMessage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.commands; +package buttondevteam.presents.components.dictionary.commands; import org.bukkit.command.CommandSender; diff --git a/src/main/java/buttondevteam/presents/dictionary/config/LoadConfig.java b/src/main/java/buttondevteam/presents/components/dictionary/config/LoadConfig.java similarity index 91% rename from src/main/java/buttondevteam/presents/dictionary/config/LoadConfig.java rename to src/main/java/buttondevteam/presents/components/dictionary/config/LoadConfig.java index 07590a0..e168e51 100644 --- a/src/main/java/buttondevteam/presents/dictionary/config/LoadConfig.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/config/LoadConfig.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.config; +package buttondevteam.presents.components.dictionary.config; diff --git a/src/main/java/buttondevteam/presents/dictionary/config/SaveConfig.java b/src/main/java/buttondevteam/presents/components/dictionary/config/SaveConfig.java similarity index 92% rename from src/main/java/buttondevteam/presents/dictionary/config/SaveConfig.java rename to src/main/java/buttondevteam/presents/components/dictionary/config/SaveConfig.java index e7b7eeb..00a9ef0 100644 --- a/src/main/java/buttondevteam/presents/dictionary/config/SaveConfig.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/config/SaveConfig.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.config; +package buttondevteam.presents.components.dictionary.config; import java.util.Arrays; diff --git a/src/main/java/buttondevteam/presents/dictionary/config/TimePersistence.java b/src/main/java/buttondevteam/presents/components/dictionary/config/TimePersistence.java similarity index 95% rename from src/main/java/buttondevteam/presents/dictionary/config/TimePersistence.java rename to src/main/java/buttondevteam/presents/components/dictionary/config/TimePersistence.java index d59e675..99064ee 100644 --- a/src/main/java/buttondevteam/presents/dictionary/config/TimePersistence.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/config/TimePersistence.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.config; +package buttondevteam.presents.components.dictionary.config; import java.text.SimpleDateFormat; import java.util.Date; diff --git a/src/main/java/buttondevteam/presents/components/dictionary/copy/DictionaryComponent.java b/src/main/java/buttondevteam/presents/components/dictionary/copy/DictionaryComponent.java new file mode 100644 index 0000000..f6b04c3 --- /dev/null +++ b/src/main/java/buttondevteam/presents/components/dictionary/copy/DictionaryComponent.java @@ -0,0 +1,51 @@ +package buttondevteam.presents.components.dictionary.copy; + +import org.bukkit.plugin.java.JavaPlugin; + +import buttondevteam.presents.architecture.Component; +import buttondevteam.presents.components.dictionary.commands.SendJSON; +import buttondevteam.presents.components.dictionary.commands.SendMessage; +import buttondevteam.presents.components.dictionary.config.LoadConfig; +import buttondevteam.presents.components.dictionary.config.SaveConfig; +import buttondevteam.presents.components.dictionary.config.TimePersistence; +import buttondevteam.presents.components.dictionary.effects.Bedsplode; +import buttondevteam.presents.components.dictionary.pages.DataPage; +import buttondevteam.presents.components.dictionary.pages.HelloPage; +import buttondevteam.presents.components.dictionary.pages.JSONPage; +import buttondevteam.presents.components.dictionary.pages.LocationPage; +import buttondevteam.presents.components.dictionary.pages.POSTPage; +import buttondevteam.presents.components.dictionary.pages.PlayersOnlinePage; +import buttondevteam.presents.components.dictionary.spawning.PlaySound; +import buttondevteam.presents.components.dictionary.spawning.SetBlock; +import buttondevteam.presents.components.dictionary.spawning.SpawnCow; +import buttondevteam.presents.components.dictionary.spawning.SpawnItem; +import buttondevteam.presents.components.dictionary.spawning.SpawnMagicPotato; +import buttondevteam.presents.components.dictionary.spawning.SpawnParticle; + +public class DictionaryComponent extends Component{ + + @Override + public void register(JavaPlugin plugin) { + + this.registerCommand(plugin, new SendMessage()); + this.registerCommand(plugin, new SendJSON()); + this.registerCommand(plugin, new SaveConfig()); + this.registerCommand(plugin, new LoadConfig()); + this.registerCommand(plugin, new TimePersistence()); + + this.registerListener(plugin, new Bedsplode()); + this.registerCommand(plugin, new SpawnCow()); + this.registerCommand(plugin, new SpawnItem()); + this.registerCommand(plugin, new SpawnMagicPotato()); + this.registerCommand(plugin, new SetBlock()); + this.registerCommand(plugin, new SpawnParticle()); + this.registerCommand(plugin, new PlaySound()); + + this.addPage(plugin, new HelloPage()); + this.addPage(plugin, new DataPage()); + this.addPage(plugin, new PlayersOnlinePage(plugin)); + this.addPage(plugin, new LocationPage(plugin)); + this.addPage(plugin, new POSTPage(plugin)); + this.addPage(plugin, new JSONPage()); + } +} diff --git a/src/main/java/buttondevteam/presents/dictionary/effects/Bedsplode.java b/src/main/java/buttondevteam/presents/components/dictionary/effects/Bedsplode.java similarity index 92% rename from src/main/java/buttondevteam/presents/dictionary/effects/Bedsplode.java rename to src/main/java/buttondevteam/presents/components/dictionary/effects/Bedsplode.java index e6aa6f4..34a85ec 100644 --- a/src/main/java/buttondevteam/presents/dictionary/effects/Bedsplode.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/effects/Bedsplode.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.effects; +package buttondevteam.presents.components.dictionary.effects; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; diff --git a/src/main/java/buttondevteam/presents/dictionary/pages/DataPage.java b/src/main/java/buttondevteam/presents/components/dictionary/pages/DataPage.java similarity index 88% rename from src/main/java/buttondevteam/presents/dictionary/pages/DataPage.java rename to src/main/java/buttondevteam/presents/components/dictionary/pages/DataPage.java index 05e630c..2925b07 100644 --- a/src/main/java/buttondevteam/presents/dictionary/pages/DataPage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/pages/DataPage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.pages; +package buttondevteam.presents.components.dictionary.pages; import com.sun.net.httpserver.HttpExchange; diff --git a/src/main/java/buttondevteam/presents/dictionary/pages/HelloPage.java b/src/main/java/buttondevteam/presents/components/dictionary/pages/HelloPage.java similarity index 85% rename from src/main/java/buttondevteam/presents/dictionary/pages/HelloPage.java rename to src/main/java/buttondevteam/presents/components/dictionary/pages/HelloPage.java index 69b45ea..f4bf12f 100644 --- a/src/main/java/buttondevteam/presents/dictionary/pages/HelloPage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/pages/HelloPage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.pages; +package buttondevteam.presents.components.dictionary.pages; import com.sun.net.httpserver.HttpExchange; diff --git a/src/main/java/buttondevteam/presents/dictionary/pages/JSONPage.java b/src/main/java/buttondevteam/presents/components/dictionary/pages/JSONPage.java similarity index 92% rename from src/main/java/buttondevteam/presents/dictionary/pages/JSONPage.java rename to src/main/java/buttondevteam/presents/components/dictionary/pages/JSONPage.java index 46ea5bb..71e220e 100644 --- a/src/main/java/buttondevteam/presents/dictionary/pages/JSONPage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/pages/JSONPage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.pages; +package buttondevteam.presents.components.dictionary.pages; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/src/main/java/buttondevteam/presents/dictionary/pages/LocationPage.java b/src/main/java/buttondevteam/presents/components/dictionary/pages/LocationPage.java similarity index 95% rename from src/main/java/buttondevteam/presents/dictionary/pages/LocationPage.java rename to src/main/java/buttondevteam/presents/components/dictionary/pages/LocationPage.java index 464c918..38c229c 100644 --- a/src/main/java/buttondevteam/presents/dictionary/pages/LocationPage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/pages/LocationPage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.pages; +package buttondevteam.presents.components.dictionary.pages; import org.bukkit.Location; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dictionary/pages/POSTPage.java b/src/main/java/buttondevteam/presents/components/dictionary/pages/POSTPage.java similarity index 94% rename from src/main/java/buttondevteam/presents/dictionary/pages/POSTPage.java rename to src/main/java/buttondevteam/presents/components/dictionary/pages/POSTPage.java index 88d002a..f07e262 100644 --- a/src/main/java/buttondevteam/presents/dictionary/pages/POSTPage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/pages/POSTPage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.pages; +package buttondevteam.presents.components.dictionary.pages; import java.io.IOException; diff --git a/src/main/java/buttondevteam/presents/dictionary/pages/PlayersOnlinePage.java b/src/main/java/buttondevteam/presents/components/dictionary/pages/PlayersOnlinePage.java similarity index 93% rename from src/main/java/buttondevteam/presents/dictionary/pages/PlayersOnlinePage.java rename to src/main/java/buttondevteam/presents/components/dictionary/pages/PlayersOnlinePage.java index dfaadeb..ac4cecf 100644 --- a/src/main/java/buttondevteam/presents/dictionary/pages/PlayersOnlinePage.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/pages/PlayersOnlinePage.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.pages; +package buttondevteam.presents.components.dictionary.pages; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/main/java/buttondevteam/presents/dictionary/spawning/PlaySound.java b/src/main/java/buttondevteam/presents/components/dictionary/spawning/PlaySound.java similarity index 94% rename from src/main/java/buttondevteam/presents/dictionary/spawning/PlaySound.java rename to src/main/java/buttondevteam/presents/components/dictionary/spawning/PlaySound.java index 285477d..2fa28fe 100644 --- a/src/main/java/buttondevteam/presents/dictionary/spawning/PlaySound.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/spawning/PlaySound.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.spawning; +package buttondevteam.presents.components.dictionary.spawning; import org.bukkit.Sound; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dictionary/spawning/SetBlock.java b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SetBlock.java similarity index 89% rename from src/main/java/buttondevteam/presents/dictionary/spawning/SetBlock.java rename to src/main/java/buttondevteam/presents/components/dictionary/spawning/SetBlock.java index 536e445..5aa1999 100644 --- a/src/main/java/buttondevteam/presents/dictionary/spawning/SetBlock.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SetBlock.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.spawning; +package buttondevteam.presents.components.dictionary.spawning; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnCow.java b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnCow.java similarity index 88% rename from src/main/java/buttondevteam/presents/dictionary/spawning/SpawnCow.java rename to src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnCow.java index e460e9d..0e01fb7 100644 --- a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnCow.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnCow.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.spawning; +package buttondevteam.presents.components.dictionary.spawning; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnItem.java b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnItem.java similarity index 89% rename from src/main/java/buttondevteam/presents/dictionary/spawning/SpawnItem.java rename to src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnItem.java index 73e7b8c..8a19ac8 100644 --- a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnItem.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnItem.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.spawning; +package buttondevteam.presents.components.dictionary.spawning; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnMagicPotato.java b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnMagicPotato.java similarity index 94% rename from src/main/java/buttondevteam/presents/dictionary/spawning/SpawnMagicPotato.java rename to src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnMagicPotato.java index 8df1c00..470336f 100644 --- a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnMagicPotato.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnMagicPotato.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.spawning; +package buttondevteam.presents.components.dictionary.spawning; import java.util.ArrayList; diff --git a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnParticle.java b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnParticle.java similarity index 88% rename from src/main/java/buttondevteam/presents/dictionary/spawning/SpawnParticle.java rename to src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnParticle.java index cc45394..e27030c 100644 --- a/src/main/java/buttondevteam/presents/dictionary/spawning/SpawnParticle.java +++ b/src/main/java/buttondevteam/presents/components/dictionary/spawning/SpawnParticle.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dictionary.spawning; +package buttondevteam.presents.components.dictionary.spawning; import org.bukkit.Particle; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dungeon/DungeonComponent.java b/src/main/java/buttondevteam/presents/components/dungeon/DungeonComponent.java similarity index 86% rename from src/main/java/buttondevteam/presents/dungeon/DungeonComponent.java rename to src/main/java/buttondevteam/presents/components/dungeon/DungeonComponent.java index e28e0a2..88c5502 100644 --- a/src/main/java/buttondevteam/presents/dungeon/DungeonComponent.java +++ b/src/main/java/buttondevteam/presents/components/dungeon/DungeonComponent.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dungeon; +package buttondevteam.presents.components.dungeon; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/main/java/buttondevteam/presents/dungeon/DungeonCreate.java b/src/main/java/buttondevteam/presents/components/dungeon/DungeonCreate.java similarity index 96% rename from src/main/java/buttondevteam/presents/dungeon/DungeonCreate.java rename to src/main/java/buttondevteam/presents/components/dungeon/DungeonCreate.java index 6972558..34ec170 100644 --- a/src/main/java/buttondevteam/presents/dungeon/DungeonCreate.java +++ b/src/main/java/buttondevteam/presents/components/dungeon/DungeonCreate.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dungeon; +package buttondevteam.presents.components.dungeon; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/dungeon/DungeonDelete.java b/src/main/java/buttondevteam/presents/components/dungeon/DungeonDelete.java similarity index 95% rename from src/main/java/buttondevteam/presents/dungeon/DungeonDelete.java rename to src/main/java/buttondevteam/presents/components/dungeon/DungeonDelete.java index 59bd447..2c2e9f8 100644 --- a/src/main/java/buttondevteam/presents/dungeon/DungeonDelete.java +++ b/src/main/java/buttondevteam/presents/components/dungeon/DungeonDelete.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.dungeon; +package buttondevteam.presents.components.dungeon; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/magic/MagicComponent.java b/src/main/java/buttondevteam/presents/components/magic/MagicComponent.java similarity index 52% rename from src/main/java/buttondevteam/presents/magic/MagicComponent.java rename to src/main/java/buttondevteam/presents/components/magic/MagicComponent.java index 14347ee..64c17e3 100644 --- a/src/main/java/buttondevteam/presents/magic/MagicComponent.java +++ b/src/main/java/buttondevteam/presents/components/magic/MagicComponent.java @@ -1,13 +1,14 @@ -package buttondevteam.presents.magic; +package buttondevteam.presents.components.magic; import org.bukkit.plugin.java.JavaPlugin; import buttondevteam.presents.architecture.Component; -import buttondevteam.presents.magic.tricks.AliArrowListener; -import buttondevteam.presents.magic.tricks.BoomBowDeathListener; -import buttondevteam.presents.magic.tricks.BoomBowListener; -import buttondevteam.presents.magic.tricks.CannonBowListener; -import buttondevteam.presents.magic.tricks.CannonBowSettings; +import buttondevteam.presents.components.magic.tricks.AliArrowListener; +import buttondevteam.presents.components.magic.tricks.BoomBowDeathListener; +import buttondevteam.presents.components.magic.tricks.BoomBowListener; +import buttondevteam.presents.components.magic.tricks.CannonBowListener; +import buttondevteam.presents.components.magic.tricks.CannonBowSettings; + public class MagicComponent extends Component{ diff --git a/src/main/java/buttondevteam/presents/magic/tricks/AliArrowListener.java b/src/main/java/buttondevteam/presents/components/magic/tricks/AliArrowListener.java similarity index 91% rename from src/main/java/buttondevteam/presents/magic/tricks/AliArrowListener.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/AliArrowListener.java index 8ddf3cc..414bf95 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/AliArrowListener.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/AliArrowListener.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.entity.Arrow; import org.bukkit.entity.EntityType; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/AliArrowTask.java b/src/main/java/buttondevteam/presents/components/magic/tricks/AliArrowTask.java similarity index 91% rename from src/main/java/buttondevteam/presents/magic/tricks/AliArrowTask.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/AliArrowTask.java index 24d9545..762e4b4 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/AliArrowTask.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/AliArrowTask.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.Particle; import org.bukkit.entity.Arrow; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/BoomBowDeathListener.java b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowDeathListener.java similarity index 87% rename from src/main/java/buttondevteam/presents/magic/tricks/BoomBowDeathListener.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowDeathListener.java index afe8951..76c8953 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/BoomBowDeathListener.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowDeathListener.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/BoomBowListener.java b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowListener.java similarity index 95% rename from src/main/java/buttondevteam/presents/magic/tricks/BoomBowListener.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowListener.java index 982be96..938ed86 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/BoomBowListener.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowListener.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.GameMode; import org.bukkit.Location; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/BoomBowRule.java b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowRule.java similarity index 93% rename from src/main/java/buttondevteam/presents/magic/tricks/BoomBowRule.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowRule.java index 2a1bdcd..d7bc014 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/BoomBowRule.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomBowRule.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/BoomDecayTask.java b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomDecayTask.java similarity index 85% rename from src/main/java/buttondevteam/presents/magic/tricks/BoomDecayTask.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/BoomDecayTask.java index 20684c4..1e46642 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/BoomDecayTask.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/BoomDecayTask.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/CannonBowListener.java b/src/main/java/buttondevteam/presents/components/magic/tricks/CannonBowListener.java similarity index 99% rename from src/main/java/buttondevteam/presents/magic/tricks/CannonBowListener.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/CannonBowListener.java index bb07085..d5d8dc6 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/CannonBowListener.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/CannonBowListener.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/main/java/buttondevteam/presents/magic/tricks/CannonBowSettings.java b/src/main/java/buttondevteam/presents/components/magic/tricks/CannonBowSettings.java similarity index 97% rename from src/main/java/buttondevteam/presents/magic/tricks/CannonBowSettings.java rename to src/main/java/buttondevteam/presents/components/magic/tricks/CannonBowSettings.java index c269b9d..37b9448 100644 --- a/src/main/java/buttondevteam/presents/magic/tricks/CannonBowSettings.java +++ b/src/main/java/buttondevteam/presents/components/magic/tricks/CannonBowSettings.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.magic.tricks; +package buttondevteam.presents.components.magic.tricks; import org.apache.commons.lang3.math.NumberUtils; import org.bukkit.entity.Player; diff --git a/src/main/java/buttondevteam/presents/components/research/ResearchComponent.java b/src/main/java/buttondevteam/presents/components/research/ResearchComponent.java new file mode 100644 index 0000000..dd1e8fa --- /dev/null +++ b/src/main/java/buttondevteam/presents/components/research/ResearchComponent.java @@ -0,0 +1,15 @@ +package buttondevteam.presents.components.research; + +import org.bukkit.plugin.java.JavaPlugin; + +import buttondevteam.presents.architecture.Component; + +public class ResearchComponent extends Component { + + @Override + public void register(JavaPlugin plugin) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/buttondevteam/presents/spawn/ChooseColor.java b/src/main/java/buttondevteam/presents/components/spawn/ChooseColor.java similarity index 95% rename from src/main/java/buttondevteam/presents/spawn/ChooseColor.java rename to src/main/java/buttondevteam/presents/components/spawn/ChooseColor.java index 90d24a4..9fc2d2f 100644 --- a/src/main/java/buttondevteam/presents/spawn/ChooseColor.java +++ b/src/main/java/buttondevteam/presents/components/spawn/ChooseColor.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.spawn; +package buttondevteam.presents.components.spawn; import org.bukkit.Server; import org.bukkit.command.BlockCommandSender; diff --git a/src/main/java/buttondevteam/presents/spawn/SpawnComponent.java b/src/main/java/buttondevteam/presents/components/spawn/SpawnComponent.java similarity index 84% rename from src/main/java/buttondevteam/presents/spawn/SpawnComponent.java rename to src/main/java/buttondevteam/presents/components/spawn/SpawnComponent.java index 573f72b..6533739 100644 --- a/src/main/java/buttondevteam/presents/spawn/SpawnComponent.java +++ b/src/main/java/buttondevteam/presents/components/spawn/SpawnComponent.java @@ -1,4 +1,4 @@ -package buttondevteam.presents.spawn; +package buttondevteam.presents.components.spawn; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/main/java/buttondevteam/presents/dictionary/DictionaryComponent.java b/src/main/java/buttondevteam/presents/dictionary/DictionaryComponent.java deleted file mode 100644 index 1380feb..0000000 --- a/src/main/java/buttondevteam/presents/dictionary/DictionaryComponent.java +++ /dev/null @@ -1,51 +0,0 @@ -package buttondevteam.presents.dictionary; - -import org.bukkit.plugin.java.JavaPlugin; - -import buttondevteam.presents.architecture.Component; -import buttondevteam.presents.dictionary.commands.SendMessage; -import buttondevteam.presents.dictionary.config.LoadConfig; -import buttondevteam.presents.dictionary.config.SaveConfig; -import buttondevteam.presents.dictionary.config.TimePersistence; -import buttondevteam.presents.dictionary.commands.SendJSON; -import buttondevteam.presents.dictionary.effects.Bedsplode; -import buttondevteam.presents.dictionary.pages.DataPage; -import buttondevteam.presents.dictionary.pages.JSONPage; -import buttondevteam.presents.dictionary.pages.LocationPage; -import buttondevteam.presents.dictionary.pages.POSTPage; -import buttondevteam.presents.dictionary.pages.PlayersOnlinePage; -import buttondevteam.presents.dictionary.spawning.PlaySound; -import buttondevteam.presents.dictionary.spawning.SetBlock; -import buttondevteam.presents.dictionary.spawning.SpawnCow; -import buttondevteam.presents.dictionary.spawning.SpawnItem; -import buttondevteam.presents.dictionary.spawning.SpawnMagicPotato; -import buttondevteam.presents.dictionary.spawning.SpawnParticle; -import buttondevteam.presents.dictionary.pages.HelloPage; - -public class DictionaryComponent extends Component{ - - @Override - public void register(JavaPlugin plugin) { - - this.registerCommand(plugin, new SendMessage()); - this.registerCommand(plugin, new SendJSON()); - this.registerCommand(plugin, new SaveConfig()); - this.registerCommand(plugin, new LoadConfig()); - this.registerCommand(plugin, new TimePersistence()); - - this.registerListener(plugin, new Bedsplode()); - this.registerCommand(plugin, new SpawnCow()); - this.registerCommand(plugin, new SpawnItem()); - this.registerCommand(plugin, new SpawnMagicPotato()); - this.registerCommand(plugin, new SetBlock()); - this.registerCommand(plugin, new SpawnParticle()); - this.registerCommand(plugin, new PlaySound()); - - this.addPage(plugin, new HelloPage()); - this.addPage(plugin, new DataPage()); - this.addPage(plugin, new PlayersOnlinePage(plugin)); - this.addPage(plugin, new LocationPage(plugin)); - this.addPage(plugin, new POSTPage(plugin)); - this.addPage(plugin, new JSONPage()); - } -}