Renamed Hello package into "Dictionary" package

This commit is contained in:
alisolarflare 2017-06-25 13:58:09 -04:00
parent 196efad665
commit 9da8aa72df
21 changed files with 103 additions and 103 deletions

View file

@ -5,7 +5,7 @@ import java.util.logging.Logger;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import buttondevteam.presents.hello.HelloComponent;
import buttondevteam.presents.dictionary.DictionaryComponent;
import buttondevteam.presents.metrics.MetricsComponent;
import buttondevteam.presents.rtp.RandomTeleportComponent;
@ -16,7 +16,7 @@ PluginDescriptionFile pdfFile = getDescription();
Logger logger = getLogger();
logger.info(pdfFile.getName() + " has been started (V." + pdfFile.getVersion()+ ").");
new HelloComponent().register(this);
new DictionaryComponent().register(this);
new RandomTeleportComponent().register(this);
new MetricsComponent().register(this);

View file

@ -0,0 +1,51 @@
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());
}
}

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.commands;
package buttondevteam.presents.dictionary.commands;
import org.bukkit.entity.Player;
@ -9,8 +9,8 @@ import com.google.gson.GsonBuilder;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.ModCommand;
@CommandClass(modOnly = true, path="hello json")
public class HelloJSON extends ModCommand{
@CommandClass(modOnly = true, path="dictionary json")
public class SendJSON extends ModCommand{
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,12 +1,12 @@
package buttondevteam.presents.hello.commands;
package buttondevteam.presents.dictionary.commands;
import org.bukkit.command.CommandSender;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.UniversalCommand;
@CommandClass(modOnly = false, path="hello command")
public class HelloCommand extends UniversalCommand {
@CommandClass(modOnly = false, path="dictionary command")
public class SendMessage extends UniversalCommand {
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.commands;
package buttondevteam.presents.dictionary.config;
@ -9,8 +9,8 @@ import org.bukkit.command.CommandSender;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.UniversalCommand;
@CommandClass(path = "hello load")
public class HelloLoad extends UniversalCommand {
@CommandClass(path = "dictionary load")
public class LoadConfig extends UniversalCommand {
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.commands;
package buttondevteam.presents.dictionary.config;
import java.util.Arrays;
@ -7,8 +7,8 @@ import org.bukkit.command.CommandSender;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.UniversalCommand;
@CommandClass(path = "hello save")
public class HelloSave extends UniversalCommand {
@CommandClass(path = "dictionary save")
public class SaveConfig extends UniversalCommand {
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
if (args.length < 1){

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.commands;
package buttondevteam.presents.dictionary.config;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -8,8 +8,8 @@ import org.bukkit.configuration.file.FileConfiguration;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.UniversalCommand;
@CommandClass(path = "hello time")
public class HelloTime extends UniversalCommand {
@CommandClass(path = "dictionary time")
public class TimePersistence extends UniversalCommand {
final String path = "hellotime.lastincident";
@Override

View file

@ -1,11 +1,11 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.effects;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerBedEnterEvent;
public class HelloBedsplode implements Listener {
public class Bedsplode implements Listener {
@EventHandler
public void onSleep(PlayerBedEnterEvent event){
Player player = event.getPlayer();

View file

@ -1,11 +1,11 @@
package buttondevteam.presents.hello.pages;
package buttondevteam.presents.dictionary.pages;
import com.sun.net.httpserver.HttpExchange;
import buttondevteam.website.io.Response;
import buttondevteam.website.page.Page;
public class HelloDataPage extends Page{
public class DataPage extends Page{
private final int data = 1234561;
@Override

View file

@ -1,11 +1,11 @@
package buttondevteam.presents.hello.pages;
package buttondevteam.presents.dictionary.pages;
import com.sun.net.httpserver.HttpExchange;
import buttondevteam.website.io.Response;
import buttondevteam.website.page.Page;
public class HelloWorldPage extends Page {
public class HelloPage extends Page {
@Override
public String GetName() {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.pages;
package buttondevteam.presents.dictionary.pages;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@ -7,7 +7,7 @@ import com.sun.net.httpserver.HttpExchange;
import buttondevteam.website.io.Response;
import buttondevteam.website.page.Page;
public class HelloJSONPage extends Page {
public class JSONPage extends Page {
@Override
public String GetName() {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.pages;
package buttondevteam.presents.dictionary.pages;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@ -9,10 +9,10 @@ import com.sun.net.httpserver.HttpExchange;
import buttondevteam.website.io.Response;
import buttondevteam.website.page.Page;
public class HelloLocationPage extends Page{
public class LocationPage extends Page{
JavaPlugin plugin;
public HelloLocationPage(JavaPlugin plugin){
public LocationPage(JavaPlugin plugin){
this.plugin = plugin;
}
@Override

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.pages;
package buttondevteam.presents.dictionary.pages;
import java.io.IOException;
@ -9,10 +9,10 @@ import com.sun.net.httpserver.HttpExchange;
import buttondevteam.website.io.Response;
import buttondevteam.website.page.Page;
public class HelloPOSTPage extends Page {
public class POSTPage extends Page {
JavaPlugin plugin;
String saveFilePath = "hello.pages.hellopostpage.saved";
public HelloPOSTPage(JavaPlugin plugin) {
public POSTPage(JavaPlugin plugin) {
this.plugin = plugin;
}

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.pages;
package buttondevteam.presents.dictionary.pages;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
@ -8,10 +8,10 @@ import com.sun.net.httpserver.HttpExchange;
import buttondevteam.website.io.Response;
import buttondevteam.website.page.Page;
public class HelloPlayersPage extends Page{
public class PlayersOnlinePage extends Page{
private JavaPlugin plugin;
public HelloPlayersPage(JavaPlugin plugin){
public PlayersOnlinePage(JavaPlugin plugin){
this.plugin = plugin;
}

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.spawning;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
@ -6,8 +6,8 @@ import org.bukkit.entity.Player;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.PlayerCommand;
@CommandClass(path = "hello sound")
public class HelloSound extends PlayerCommand{
@CommandClass(path = "dictionary sound")
public class PlaySound extends PlayerCommand{
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.spawning;
import org.bukkit.Material;
import org.bukkit.block.Block;
@ -7,8 +7,8 @@ import org.bukkit.entity.Player;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.PlayerCommand;
@CommandClass(path = "hello block")
public class HelloBlock extends PlayerCommand {
@CommandClass(path = "dictionary block")
public class SetBlock extends PlayerCommand {
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,12 +1,12 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.spawning;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.PlayerCommand;
@CommandClass(path = "hello cow")
public class HelloCow extends PlayerCommand {
@CommandClass(path = "dictionary cow")
public class SpawnCow extends PlayerCommand {
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.spawning;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -7,8 +7,8 @@ import org.bukkit.inventory.ItemStack;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.ModCommand;
@CommandClass(path = "hello item")
public class HelloItem extends ModCommand {
@CommandClass(path = "dictionary item")
public class SpawnItem extends ModCommand {
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.spawning;
import java.util.ArrayList;
@ -11,8 +11,8 @@ import org.bukkit.inventory.meta.ItemMeta;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.ModCommand;
@CommandClass(path = "hello magicpotato")
public class HelloMagicPotato extends ModCommand {
@CommandClass(path = "dictionary magicpotato")
public class SpawnMagicPotato extends ModCommand {
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,4 +1,4 @@
package buttondevteam.presents.hello.effects;
package buttondevteam.presents.dictionary.spawning;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
@ -6,8 +6,8 @@ import org.bukkit.entity.Player;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.presents.architecture.commands.PlayerCommand;
@CommandClass(path = "hello particle")
public class HelloParticle extends PlayerCommand {
@CommandClass(path = "dictionary particle")
public class SpawnParticle extends PlayerCommand {
@Override
public boolean OnCommand(Player player, String alias, String[] args) {

View file

@ -1,51 +0,0 @@
package buttondevteam.presents.hello;
import org.bukkit.plugin.java.JavaPlugin;
import buttondevteam.presents.architecture.Component;
import buttondevteam.presents.hello.commands.HelloCommand;
import buttondevteam.presents.hello.commands.HelloJSON;
import buttondevteam.presents.hello.commands.HelloLoad;
import buttondevteam.presents.hello.commands.HelloSave;
import buttondevteam.presents.hello.commands.HelloTime;
import buttondevteam.presents.hello.effects.HelloBedsplode;
import buttondevteam.presents.hello.effects.HelloBlock;
import buttondevteam.presents.hello.effects.HelloCow;
import buttondevteam.presents.hello.effects.HelloItem;
import buttondevteam.presents.hello.effects.HelloMagicPotato;
import buttondevteam.presents.hello.effects.HelloParticle;
import buttondevteam.presents.hello.effects.HelloSound;
import buttondevteam.presents.hello.pages.HelloDataPage;
import buttondevteam.presents.hello.pages.HelloJSONPage;
import buttondevteam.presents.hello.pages.HelloLocationPage;
import buttondevteam.presents.hello.pages.HelloPOSTPage;
import buttondevteam.presents.hello.pages.HelloPlayersPage;
import buttondevteam.presents.hello.pages.HelloWorldPage;
public class HelloComponent extends Component{
@Override
public void register(JavaPlugin plugin) {
this.registerCommand(plugin, new HelloCommand());
this.registerCommand(plugin, new HelloJSON());
this.registerCommand(plugin, new HelloSave());
this.registerCommand(plugin, new HelloLoad());
this.registerCommand(plugin, new HelloTime());
this.registerListener(plugin, new HelloBedsplode());
this.registerCommand(plugin, new HelloCow());
this.registerCommand(plugin, new HelloItem());
this.registerCommand(plugin, new HelloMagicPotato());
this.registerCommand(plugin, new HelloBlock());
this.registerCommand(plugin, new HelloParticle());
this.registerCommand(plugin, new HelloSound());
this.addPage(plugin, new HelloWorldPage());
this.addPage(plugin, new HelloDataPage());
this.addPage(plugin, new HelloPlayersPage(plugin));
this.addPage(plugin, new HelloLocationPage(plugin));
this.addPage(plugin, new HelloPOSTPage(plugin));
this.addPage(plugin, new HelloJSONPage());
}
}