Refactoring - Moved components into new folder

This commit is contained in:
alisolarflare 2017-12-28 12:59:29 -05:00
parent fd4a8139af
commit 1c1e308375
38 changed files with 159 additions and 99 deletions

View file

@ -17,18 +17,11 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
<accessrules>
<accessrule kind="accessible" pattern="com/sun/net/httpserver/HttpExchange"/>
</accessrules>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View file

@ -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(){

View file

@ -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());
}
}

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.commands;
package buttondevteam.presents.components.dictionary.commands;
import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.commands;
package buttondevteam.presents.components.dictionary.commands;
import org.bukkit.command.CommandSender;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.config;
package buttondevteam.presents.components.dictionary.config;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.config;
package buttondevteam.presents.components.dictionary.config;
import java.util.Arrays;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.config;
package buttondevteam.presents.components.dictionary.config;
import java.text.SimpleDateFormat;
import java.util.Date;

View file

@ -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());
}
}

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.pages;
package buttondevteam.presents.components.dictionary.pages;
import com.sun.net.httpserver.HttpExchange;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.pages;
package buttondevteam.presents.components.dictionary.pages;
import com.sun.net.httpserver.HttpExchange;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.pages;
package buttondevteam.presents.components.dictionary.pages;
import org.bukkit.Location;
import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.pages;
package buttondevteam.presents.components.dictionary.pages;
import java.io.IOException;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.spawning;
package buttondevteam.presents.components.dictionary.spawning;
import org.bukkit.Sound;
import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.spawning;
package buttondevteam.presents.components.dictionary.spawning;
import org.bukkit.Material;
import org.bukkit.block.Block;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.spawning;
package buttondevteam.presents.components.dictionary.spawning;
import org.bukkit.Material;
import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.spawning;
package buttondevteam.presents.components.dictionary.spawning;
import java.util.ArrayList;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dictionary.spawning;
package buttondevteam.presents.components.dictionary.spawning;
import org.bukkit.Particle;
import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dungeon;
package buttondevteam.presents.components.dungeon;
import org.bukkit.plugin.java.JavaPlugin;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dungeon;
package buttondevteam.presents.components.dungeon;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.dungeon;
package buttondevteam.presents.components.dungeon;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;

View file

@ -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{

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.magic.tricks;
package buttondevteam.presents.components.magic.tricks;
import org.bukkit.Particle;
import org.bukkit.entity.Arrow;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.magic.tricks;
package buttondevteam.presents.components.magic.tricks;
import org.bukkit.GameMode;
import org.bukkit.Location;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.magic.tricks;
package buttondevteam.presents.components.magic.tricks;
import org.bukkit.entity.Player;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.magic.tricks;
package buttondevteam.presents.components.magic.tricks;
import org.bukkit.Location;
import org.bukkit.Material;

View file

@ -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;

View file

@ -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
}
}

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.spawn;
package buttondevteam.presents.components.spawn;
import org.bukkit.Server;
import org.bukkit.command.BlockCommandSender;

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.spawn;
package buttondevteam.presents.components.spawn;
import org.bukkit.plugin.java.JavaPlugin;

View file

@ -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());
}
}