From 02f19712ae6de5f3cd5b54817131f56a65867fb0 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 11 Nov 2016 13:43:39 -0500 Subject: [PATCH] Shoved Gpowers into EasyUHC --- src/alisolarflare/AliPresents.java | 2 +- src/alisolarflare/DevCommand.java | 26 +++++++++ src/alisolarflare/easyuhc/EasyUHCModule.java | 52 +++++++++--------- .../easyuhc/commands/ActivatePowers.java | 52 +++++++----------- .../easyuhc/commands/SetUHCLobby.java | 27 ++++++++++ .../easyuhc/commands/SetWorldBorders.java | 53 +++++++----------- .../easyuhc/commands/ShrinkWorldBorders.java | 53 +++++++----------- .../easyuhc/commands/SpreadPlayers.java | 54 ++++++++----------- .../easyuhc/commands/StartTimer.java | 53 +++++++----------- .../easyuhc/commands/StartUHC.java | 53 +++++++----------- .../easyuhc/commands/TeleportToUHC.java | 53 +++++++----------- .../easyuhc/gpowers/GPowerMemory.java | 2 +- .../easyuhc/gpowers/GPowerModule.java | 10 ++-- .../easyuhc/gpowers/commands/GPower.java | 4 +- .../easyuhc/gpowers/commands/PowerDown.java | 4 +- .../easyuhc/gpowers/commands/PowerUp.java | 4 +- .../gpowers/listeners/gPowerApplyingTask.java | 4 +- .../gpowers/listeners/gPowerListener.java | 4 +- 18 files changed, 238 insertions(+), 272 deletions(-) create mode 100644 src/alisolarflare/DevCommand.java create mode 100644 src/alisolarflare/easyuhc/commands/SetUHCLobby.java diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java index 2af4284..04b65fc 100644 --- a/src/alisolarflare/AliPresents.java +++ b/src/alisolarflare/AliPresents.java @@ -7,10 +7,10 @@ import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.components.flairdoor.FlairDoorModule; -import alisolarflare.components.gpowers.GPowerModule; import alisolarflare.components.links.AliLinkModule; import alisolarflare.creativeboundaries.CreativeBoundariesModule; import alisolarflare.easyuhc.EasyUHCModule; +import alisolarflare.easyuhc.gpowers.GPowerModule; import alisolarflare.magic.MagicModule; import alisolarflare.minigames.MinigameModule; diff --git a/src/alisolarflare/DevCommand.java b/src/alisolarflare/DevCommand.java new file mode 100644 index 0000000..a4c5091 --- /dev/null +++ b/src/alisolarflare/DevCommand.java @@ -0,0 +1,26 @@ +package alisolarflare; + +import org.bukkit.command.CommandSender; + +import buttondevteam.lib.chat.TBMCCommandBase; + +public abstract class DevCommand extends TBMCCommandBase{ + + @Override + public abstract boolean OnCommand(CommandSender sender, String alias, String[] args); + + @Override + public abstract String[] GetHelpText(String alias); + + @Override + public boolean GetPlayerOnly() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean GetModOnly() { + // TODO Auto-generated method stub + return true; + } +} diff --git a/src/alisolarflare/easyuhc/EasyUHCModule.java b/src/alisolarflare/easyuhc/EasyUHCModule.java index 408e909..b96d80b 100644 --- a/src/alisolarflare/easyuhc/EasyUHCModule.java +++ b/src/alisolarflare/easyuhc/EasyUHCModule.java @@ -1,24 +1,28 @@ -package alisolarflare.easyuhc; - -import org.bukkit.plugin.java.JavaPlugin; - -import alisolarflare.Module; -import alisolarflare.easyuhc.commands.ActivatePowers; -import alisolarflare.easyuhc.commands.SetupWorldBorders; -import alisolarflare.easyuhc.commands.SpreadPlayers; -import alisolarflare.easyuhc.commands.StartTimer; -import alisolarflare.easyuhc.commands.StartUHC; -import alisolarflare.easyuhc.commands.TeleportToUHC; - -public class EasyUHCModule extends Module{ - @Override - public void register(JavaPlugin plugin) { - registerCommand(plugin, new ActivatePowers()); - registerCommand(plugin, new SetupWorldBorders()); - registerCommand(plugin, new SetupWorldBorders()); - registerCommand(plugin, new SpreadPlayers()); - registerCommand(plugin, new StartTimer()); - registerCommand(plugin, new StartUHC()); - registerCommand(plugin, new TeleportToUHC()); - } -} +package alisolarflare.easyuhc; + +import org.bukkit.Location; +import org.bukkit.plugin.java.JavaPlugin; + +import alisolarflare.Module; +import alisolarflare.easyuhc.commands.ActivatePowers; +import alisolarflare.easyuhc.commands.SetUHCLobby; +import alisolarflare.easyuhc.commands.SetWorldBorders; +import alisolarflare.easyuhc.commands.SpreadPlayers; +import alisolarflare.easyuhc.commands.StartTimer; +import alisolarflare.easyuhc.commands.StartUHC; +import alisolarflare.easyuhc.commands.TeleportToUHC; + +public class EasyUHCModule extends Module{ + public Location lobbyLocation; + @Override + public void register(JavaPlugin plugin) { + registerCommand(plugin, new ActivatePowers()); + registerCommand(plugin, new SetUHCLobby(this)); + registerCommand(plugin, new SetWorldBorders()); + registerCommand(plugin, new SetWorldBorders()); + registerCommand(plugin, new SpreadPlayers()); + registerCommand(plugin, new StartTimer()); + registerCommand(plugin, new StartUHC()); + registerCommand(plugin, new TeleportToUHC()); + } +} diff --git a/src/alisolarflare/easyuhc/commands/ActivatePowers.java b/src/alisolarflare/easyuhc/commands/ActivatePowers.java index 737ac72..8f78fa1 100644 --- a/src/alisolarflare/easyuhc/commands/ActivatePowers.java +++ b/src/alisolarflare/easyuhc/commands/ActivatePowers.java @@ -1,33 +1,19 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class ActivatePowers extends TBMCCommandBase{ - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class ActivatePowers extends DevCommand{ + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/alisolarflare/easyuhc/commands/SetUHCLobby.java b/src/alisolarflare/easyuhc/commands/SetUHCLobby.java new file mode 100644 index 0000000..72609eb --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/SetUHCLobby.java @@ -0,0 +1,27 @@ +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import alisolarflare.DevCommand; +import alisolarflare.easyuhc.EasyUHCModule; + +public class SetUHCLobby extends DevCommand{ + EasyUHCModule module; + public SetUHCLobby(EasyUHCModule easyUHCModule) { + this.module = easyUHCModule; + } + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + module.lobbyLocation = ((Player) sender).getLocation(); + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/SetWorldBorders.java b/src/alisolarflare/easyuhc/commands/SetWorldBorders.java index ef90ae8..0f66241 100644 --- a/src/alisolarflare/easyuhc/commands/SetWorldBorders.java +++ b/src/alisolarflare/easyuhc/commands/SetWorldBorders.java @@ -1,33 +1,20 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class SetupWorldBorders extends TBMCCommandBase { - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class SetWorldBorders extends DevCommand { + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java b/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java index bd083a6..76f993b 100644 --- a/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java +++ b/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java @@ -1,33 +1,20 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class ShrinkWorldBorders extends TBMCCommandBase { - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class ShrinkWorldBorders extends DevCommand { + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/alisolarflare/easyuhc/commands/SpreadPlayers.java b/src/alisolarflare/easyuhc/commands/SpreadPlayers.java index a5798ac..2b3cb12 100644 --- a/src/alisolarflare/easyuhc/commands/SpreadPlayers.java +++ b/src/alisolarflare/easyuhc/commands/SpreadPlayers.java @@ -1,33 +1,21 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class SpreadPlayers extends TBMCCommandBase{ - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class SpreadPlayers extends DevCommand{ + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/StartTimer.java b/src/alisolarflare/easyuhc/commands/StartTimer.java index 927344e..c7c613c 100644 --- a/src/alisolarflare/easyuhc/commands/StartTimer.java +++ b/src/alisolarflare/easyuhc/commands/StartTimer.java @@ -1,33 +1,20 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class StartTimer extends TBMCCommandBase{ - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class StartTimer extends DevCommand{ + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/alisolarflare/easyuhc/commands/StartUHC.java b/src/alisolarflare/easyuhc/commands/StartUHC.java index 2a06889..63d9df7 100644 --- a/src/alisolarflare/easyuhc/commands/StartUHC.java +++ b/src/alisolarflare/easyuhc/commands/StartUHC.java @@ -1,33 +1,20 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class StartUHC extends TBMCCommandBase{ - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class StartUHC extends DevCommand{ + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/alisolarflare/easyuhc/commands/TeleportToUHC.java b/src/alisolarflare/easyuhc/commands/TeleportToUHC.java index 5a5c6d0..463f30a 100644 --- a/src/alisolarflare/easyuhc/commands/TeleportToUHC.java +++ b/src/alisolarflare/easyuhc/commands/TeleportToUHC.java @@ -1,33 +1,20 @@ -package alisolarflare.easyuhc.commands; - -import org.bukkit.command.CommandSender; - -import buttondevteam.lib.chat.TBMCCommandBase; - -public class TeleportToUHC extends TBMCCommandBase{ - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.easyuhc.commands; + +import org.bukkit.command.CommandSender; + +import alisolarflare.DevCommand; + +public class TeleportToUHC extends DevCommand{ + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/alisolarflare/easyuhc/gpowers/GPowerMemory.java b/src/alisolarflare/easyuhc/gpowers/GPowerMemory.java index 44e0089..ccbab17 100644 --- a/src/alisolarflare/easyuhc/gpowers/GPowerMemory.java +++ b/src/alisolarflare/easyuhc/gpowers/GPowerMemory.java @@ -1,4 +1,4 @@ -package alisolarflare.components.gpowers; +package alisolarflare.easyuhc.gpowers; import java.util.HashMap; import java.util.Map; diff --git a/src/alisolarflare/easyuhc/gpowers/GPowerModule.java b/src/alisolarflare/easyuhc/gpowers/GPowerModule.java index 3148ee0..2b0dfd4 100644 --- a/src/alisolarflare/easyuhc/gpowers/GPowerModule.java +++ b/src/alisolarflare/easyuhc/gpowers/GPowerModule.java @@ -1,12 +1,12 @@ -package alisolarflare.components.gpowers; +package alisolarflare.easyuhc.gpowers; import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.Module; -import alisolarflare.components.gpowers.commands.GPower; -import alisolarflare.components.gpowers.commands.PowerDown; -import alisolarflare.components.gpowers.commands.PowerUp; -import alisolarflare.components.gpowers.listeners.gPowerListener; +import alisolarflare.easyuhc.gpowers.commands.GPower; +import alisolarflare.easyuhc.gpowers.commands.PowerDown; +import alisolarflare.easyuhc.gpowers.commands.PowerUp; +import alisolarflare.easyuhc.gpowers.listeners.gPowerListener; public class GPowerModule extends Module { diff --git a/src/alisolarflare/easyuhc/gpowers/commands/GPower.java b/src/alisolarflare/easyuhc/gpowers/commands/GPower.java index 4a90d21..b261519 100644 --- a/src/alisolarflare/easyuhc/gpowers/commands/GPower.java +++ b/src/alisolarflare/easyuhc/gpowers/commands/GPower.java @@ -1,9 +1,9 @@ -package alisolarflare.components.gpowers.commands; +package alisolarflare.easyuhc.gpowers.commands; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import alisolarflare.components.gpowers.GPowerMemory; +import alisolarflare.easyuhc.gpowers.GPowerMemory; import buttondevteam.lib.chat.TBMCCommandBase; public class GPower extends TBMCCommandBase { diff --git a/src/alisolarflare/easyuhc/gpowers/commands/PowerDown.java b/src/alisolarflare/easyuhc/gpowers/commands/PowerDown.java index 8f3467b..46f1717 100644 --- a/src/alisolarflare/easyuhc/gpowers/commands/PowerDown.java +++ b/src/alisolarflare/easyuhc/gpowers/commands/PowerDown.java @@ -1,9 +1,9 @@ -package alisolarflare.components.gpowers.commands; +package alisolarflare.easyuhc.gpowers.commands; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import alisolarflare.components.gpowers.GPowerMemory; +import alisolarflare.easyuhc.gpowers.GPowerMemory; import buttondevteam.lib.chat.TBMCCommandBase; public class PowerDown extends TBMCCommandBase { diff --git a/src/alisolarflare/easyuhc/gpowers/commands/PowerUp.java b/src/alisolarflare/easyuhc/gpowers/commands/PowerUp.java index 84670f3..0f5748c 100644 --- a/src/alisolarflare/easyuhc/gpowers/commands/PowerUp.java +++ b/src/alisolarflare/easyuhc/gpowers/commands/PowerUp.java @@ -1,9 +1,9 @@ -package alisolarflare.components.gpowers.commands; +package alisolarflare.easyuhc.gpowers.commands; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import alisolarflare.components.gpowers.GPowerMemory; +import alisolarflare.easyuhc.gpowers.GPowerMemory; import buttondevteam.lib.chat.TBMCCommandBase; public class PowerUp extends TBMCCommandBase { diff --git a/src/alisolarflare/easyuhc/gpowers/listeners/gPowerApplyingTask.java b/src/alisolarflare/easyuhc/gpowers/listeners/gPowerApplyingTask.java index d966e63..a537565 100644 --- a/src/alisolarflare/easyuhc/gpowers/listeners/gPowerApplyingTask.java +++ b/src/alisolarflare/easyuhc/gpowers/listeners/gPowerApplyingTask.java @@ -1,4 +1,4 @@ -package alisolarflare.components.gpowers.listeners; +package alisolarflare.easyuhc.gpowers.listeners; import java.util.Map; import java.util.UUID; @@ -10,7 +10,7 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.scheduler.BukkitRunnable; -import alisolarflare.components.gpowers.GPowerMemory.poweredPlayer; +import alisolarflare.easyuhc.gpowers.GPowerMemory.poweredPlayer; public class gPowerApplyingTask extends BukkitRunnable{ diff --git a/src/alisolarflare/easyuhc/gpowers/listeners/gPowerListener.java b/src/alisolarflare/easyuhc/gpowers/listeners/gPowerListener.java index 1b71481..802bb63 100644 --- a/src/alisolarflare/easyuhc/gpowers/listeners/gPowerListener.java +++ b/src/alisolarflare/easyuhc/gpowers/listeners/gPowerListener.java @@ -1,9 +1,9 @@ -package alisolarflare.components.gpowers.listeners; +package alisolarflare.easyuhc.gpowers.listeners; import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; -import alisolarflare.components.gpowers.GPowerMemory; +import alisolarflare.easyuhc.gpowers.GPowerMemory; public class gPowerListener implements Listener{