From a81c0ceb7678d831ef0e7cd4d1bd5358751c26f8 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sun, 6 Nov 2016 18:23:27 -0500 Subject: [PATCH] Completely trashed UHC progress, re-organized Using finite state machines is *so much harder* than simply creating commands that a player or admin uses as the match goes on. I can always make UHC automatic later --- src/alisolarflare/AliPresents.java | 4 +- src/alisolarflare/autouhc/UHCModule.java | 36 +++++ .../controller/SetMatchState.java | 6 +- .../{uhc => autouhc}/idle/AddToUHC.java | 4 +- .../{uhc => autouhc}/idle/JoinUHC.java | 4 +- .../intro/ConfigureMatch.java | 76 +++++----- .../intro/IntroductionCutscene.java | 2 +- .../{uhc => autouhc}/intro/ScheduleMatch.java | 76 +++++----- .../{uhc => autouhc}/intro/StartMatch.java | 140 +++++++++--------- .../listeners/MatchCyclingListener.java | 2 +- .../listeners/MatchMainLoop.java | 2 +- .../{uhc => autouhc}/memory/MatchState.java | 2 +- .../{uhc => autouhc}/memory/UHCMatch.java | 2 +- src/alisolarflare/easyuhc/EasyUHCModule.java | 24 +++ .../easyuhc/commands/ActivatePowers.java | 33 +++++ .../easyuhc/commands/SetupWorldBorders.java | 33 +++++ .../easyuhc/commands/ShrinkWorldBorders.java | 33 +++++ .../easyuhc/commands/SpreadPlayers.java | 33 +++++ .../easyuhc/commands/StartTimer.java | 33 +++++ .../easyuhc/commands/StartUHC.java | 33 +++++ .../easyuhc/commands/TeleportToUHC.java | 33 +++++ src/alisolarflare/uhc/UHCModule.java | 36 ----- 22 files changed, 451 insertions(+), 196 deletions(-) create mode 100644 src/alisolarflare/autouhc/UHCModule.java rename src/alisolarflare/{uhc => autouhc}/controller/SetMatchState.java (93%) rename src/alisolarflare/{uhc => autouhc}/idle/AddToUHC.java (91%) rename src/alisolarflare/{uhc => autouhc}/idle/JoinUHC.java (90%) rename src/alisolarflare/{uhc => autouhc}/intro/ConfigureMatch.java (85%) rename src/alisolarflare/{uhc => autouhc}/intro/IntroductionCutscene.java (68%) rename src/alisolarflare/{uhc => autouhc}/intro/ScheduleMatch.java (85%) rename src/alisolarflare/{uhc => autouhc}/intro/StartMatch.java (87%) rename src/alisolarflare/{uhc => autouhc}/listeners/MatchCyclingListener.java (89%) rename src/alisolarflare/{uhc => autouhc}/listeners/MatchMainLoop.java (72%) rename src/alisolarflare/{uhc => autouhc}/memory/MatchState.java (87%) rename src/alisolarflare/{uhc => autouhc}/memory/UHCMatch.java (92%) create mode 100644 src/alisolarflare/easyuhc/EasyUHCModule.java create mode 100644 src/alisolarflare/easyuhc/commands/ActivatePowers.java create mode 100644 src/alisolarflare/easyuhc/commands/SetupWorldBorders.java create mode 100644 src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java create mode 100644 src/alisolarflare/easyuhc/commands/SpreadPlayers.java create mode 100644 src/alisolarflare/easyuhc/commands/StartTimer.java create mode 100644 src/alisolarflare/easyuhc/commands/StartUHC.java create mode 100644 src/alisolarflare/easyuhc/commands/TeleportToUHC.java delete mode 100644 src/alisolarflare/uhc/UHCModule.java diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java index 947c41b..2af4284 100644 --- a/src/alisolarflare/AliPresents.java +++ b/src/alisolarflare/AliPresents.java @@ -10,9 +10,9 @@ 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.magic.MagicModule; import alisolarflare.minigames.MinigameModule; -import alisolarflare.uhc.UHCModule; public class AliPresents extends JavaPlugin{ public void onEnable(){ @@ -25,7 +25,7 @@ public class AliPresents extends JavaPlugin{ new FlairDoorModule().register(this); new GPowerModule().register(this); new AliLinkModule().register(this); - new UHCModule().register(this); + new EasyUHCModule().register(this); new MagicModule().register(this); new MinigameModule().register(this); new CreativeBoundariesModule().register(this); diff --git a/src/alisolarflare/autouhc/UHCModule.java b/src/alisolarflare/autouhc/UHCModule.java new file mode 100644 index 0000000..3c0c2d8 --- /dev/null +++ b/src/alisolarflare/autouhc/UHCModule.java @@ -0,0 +1,36 @@ +package alisolarflare.autouhc; + +import org.bukkit.plugin.java.JavaPlugin; + +import alisolarflare.Module; +import alisolarflare.autouhc.controller.SetMatchState; +import alisolarflare.autouhc.idle.AddToUHC; +import alisolarflare.autouhc.idle.JoinUHC; +import alisolarflare.autouhc.intro.ConfigureMatch; +import alisolarflare.autouhc.intro.ScheduleMatch; +import alisolarflare.autouhc.intro.StartMatch; +import alisolarflare.autouhc.memory.MatchState; +import alisolarflare.autouhc.memory.UHCMatch; + +public class UHCModule extends Module { + public UHCMatch match; + + public void register(JavaPlugin plugin) { + + + if (plugin.getConfig().contains("UHCMatchState")){ + match = new UHCMatch(plugin.getConfig(), MatchState.valueOf(plugin.getConfig().getString("UHCMatchState"))); + }else{ + match = new UHCMatch(plugin.getConfig(), MatchState.IDLE); + } + + + //registerCommand(plugin, new SetMatchState(match)); + //registerCommand(plugin, new AddToUHC(match)); + //registerCommand(plugin, new JoinUHC(match)); + //registerCommand(plugin, new StartMatch(match)); + //registerCommand(plugin, new ConfigureMatch(match)); + //registerCommand(plugin, new ScheduleMatch(match)); + + } +} diff --git a/src/alisolarflare/uhc/controller/SetMatchState.java b/src/alisolarflare/autouhc/controller/SetMatchState.java similarity index 93% rename from src/alisolarflare/uhc/controller/SetMatchState.java rename to src/alisolarflare/autouhc/controller/SetMatchState.java index f646b50..0945cc7 100644 --- a/src/alisolarflare/uhc/controller/SetMatchState.java +++ b/src/alisolarflare/autouhc/controller/SetMatchState.java @@ -1,10 +1,10 @@ -package alisolarflare.uhc.controller; +package alisolarflare.autouhc.controller; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import alisolarflare.uhc.memory.MatchState; -import alisolarflare.uhc.memory.UHCMatch; +import alisolarflare.autouhc.memory.MatchState; +import alisolarflare.autouhc.memory.UHCMatch; import buttondevteam.lib.chat.TBMCCommandBase; public class SetMatchState extends TBMCCommandBase{ diff --git a/src/alisolarflare/uhc/idle/AddToUHC.java b/src/alisolarflare/autouhc/idle/AddToUHC.java similarity index 91% rename from src/alisolarflare/uhc/idle/AddToUHC.java rename to src/alisolarflare/autouhc/idle/AddToUHC.java index 92f2b44..b27ace6 100644 --- a/src/alisolarflare/uhc/idle/AddToUHC.java +++ b/src/alisolarflare/autouhc/idle/AddToUHC.java @@ -1,9 +1,9 @@ -package alisolarflare.uhc.idle; +package alisolarflare.autouhc.idle; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import alisolarflare.uhc.memory.UHCMatch; +import alisolarflare.autouhc.memory.UHCMatch; import buttondevteam.lib.chat.TBMCCommandBase; /** diff --git a/src/alisolarflare/uhc/idle/JoinUHC.java b/src/alisolarflare/autouhc/idle/JoinUHC.java similarity index 90% rename from src/alisolarflare/uhc/idle/JoinUHC.java rename to src/alisolarflare/autouhc/idle/JoinUHC.java index 1f61fea..764a2da 100644 --- a/src/alisolarflare/uhc/idle/JoinUHC.java +++ b/src/alisolarflare/autouhc/idle/JoinUHC.java @@ -1,9 +1,9 @@ -package alisolarflare.uhc.idle; +package alisolarflare.autouhc.idle; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import alisolarflare.uhc.memory.UHCMatch; +import alisolarflare.autouhc.memory.UHCMatch; import buttondevteam.lib.chat.TBMCCommandBase; public class JoinUHC extends TBMCCommandBase{ diff --git a/src/alisolarflare/uhc/intro/ConfigureMatch.java b/src/alisolarflare/autouhc/intro/ConfigureMatch.java similarity index 85% rename from src/alisolarflare/uhc/intro/ConfigureMatch.java rename to src/alisolarflare/autouhc/intro/ConfigureMatch.java index 6f383bb..958e571 100644 --- a/src/alisolarflare/uhc/intro/ConfigureMatch.java +++ b/src/alisolarflare/autouhc/intro/ConfigureMatch.java @@ -1,38 +1,38 @@ -package alisolarflare.uhc.intro; - -import org.bukkit.command.CommandSender; - -import alisolarflare.uhc.memory.UHCMatch; -import buttondevteam.lib.chat.TBMCCommandBase; - -public class ConfigureMatch extends TBMCCommandBase{ - - public ConfigureMatch(UHCMatch match) { - // TODO Auto-generated constructor stub - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.autouhc.intro; + +import org.bukkit.command.CommandSender; + +import alisolarflare.autouhc.memory.UHCMatch; +import buttondevteam.lib.chat.TBMCCommandBase; + +public class ConfigureMatch extends TBMCCommandBase{ + + public ConfigureMatch(UHCMatch match) { + // TODO Auto-generated constructor stub + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean GetPlayerOnly() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean GetModOnly() { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/src/alisolarflare/uhc/intro/IntroductionCutscene.java b/src/alisolarflare/autouhc/intro/IntroductionCutscene.java similarity index 68% rename from src/alisolarflare/uhc/intro/IntroductionCutscene.java rename to src/alisolarflare/autouhc/intro/IntroductionCutscene.java index 6ff7ce5..7921231 100644 --- a/src/alisolarflare/uhc/intro/IntroductionCutscene.java +++ b/src/alisolarflare/autouhc/intro/IntroductionCutscene.java @@ -1,4 +1,4 @@ -package alisolarflare.uhc.intro; +package alisolarflare.autouhc.intro; public class IntroductionCutscene { //TODO: Teleport all players to the area. diff --git a/src/alisolarflare/uhc/intro/ScheduleMatch.java b/src/alisolarflare/autouhc/intro/ScheduleMatch.java similarity index 85% rename from src/alisolarflare/uhc/intro/ScheduleMatch.java rename to src/alisolarflare/autouhc/intro/ScheduleMatch.java index 6e292c2..d1d904f 100644 --- a/src/alisolarflare/uhc/intro/ScheduleMatch.java +++ b/src/alisolarflare/autouhc/intro/ScheduleMatch.java @@ -1,38 +1,38 @@ -package alisolarflare.uhc.intro; - -import org.bukkit.command.CommandSender; - -import alisolarflare.uhc.memory.UHCMatch; -import buttondevteam.lib.chat.TBMCCommandBase; - -public class ScheduleMatch extends TBMCCommandBase{ - - public ScheduleMatch(UHCMatch match) { - // TODO Auto-generated constructor stub - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +package alisolarflare.autouhc.intro; + +import org.bukkit.command.CommandSender; + +import alisolarflare.autouhc.memory.UHCMatch; +import buttondevteam.lib.chat.TBMCCommandBase; + +public class ScheduleMatch extends TBMCCommandBase{ + + public ScheduleMatch(UHCMatch match) { + // TODO Auto-generated constructor stub + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean GetPlayerOnly() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean GetModOnly() { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/src/alisolarflare/uhc/intro/StartMatch.java b/src/alisolarflare/autouhc/intro/StartMatch.java similarity index 87% rename from src/alisolarflare/uhc/intro/StartMatch.java rename to src/alisolarflare/autouhc/intro/StartMatch.java index 0b96652..08932e8 100644 --- a/src/alisolarflare/uhc/intro/StartMatch.java +++ b/src/alisolarflare/autouhc/intro/StartMatch.java @@ -1,70 +1,70 @@ -package alisolarflare.uhc.intro; - -import org.bukkit.command.CommandSender; - -import alisolarflare.uhc.memory.MatchState; -import alisolarflare.uhc.memory.UHCMatch; -import buttondevteam.lib.chat.TBMCCommandBase; - -public class StartMatch extends TBMCCommandBase { - private UHCMatch match; - - public StartMatch(UHCMatch match) { - this.match = match; - } - - @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - - if (!sender.hasPermission("moderator") && !(sender.getName() == "")) - sender.sendMessage("You must be a moderator or Arsenalis to use this command! " - + "Contact a TBMC dev if you think this is wrong"); - - //ACTIVATES MATCH - switch(match.getMatchState()){ - case IDLE: - sender.sendMessage("There is currently a match ready... Activating..."); - match.setMatchState(MatchState.INTRO); - break; - - case WAITING: - sender.sendMessage("There currently a match planned for: TIME:TIME:TIME"); - break; - - case END: - sender.sendMessage("The match has ended! Would you like to restart using current settings?"); - break; - - default: - sender.sendMessage("You cannot start a match now, one is already in progress!"); - - - } - - return false; - - - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String GetCommandPath() { - return "startmatch"; - } - - @Override - public boolean GetPlayerOnly() { - return true; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } -} +package alisolarflare.autouhc.intro; + +import org.bukkit.command.CommandSender; + +import alisolarflare.autouhc.memory.MatchState; +import alisolarflare.autouhc.memory.UHCMatch; +import buttondevteam.lib.chat.TBMCCommandBase; + +public class StartMatch extends TBMCCommandBase { + private UHCMatch match; + + public StartMatch(UHCMatch match) { + this.match = match; + } + + @Override + public boolean OnCommand(CommandSender sender, String label, String[] args) { + + if (!sender.hasPermission("moderator") && !(sender.getName() == "")) + sender.sendMessage("You must be a moderator or Arsenalis to use this command! " + + "Contact a TBMC dev if you think this is wrong"); + + //ACTIVATES MATCH + switch(match.getMatchState()){ + case IDLE: + sender.sendMessage("There is currently a match ready... Activating..."); + match.setMatchState(MatchState.INTRO); + break; + + case WAITING: + sender.sendMessage("There currently a match planned for: TIME:TIME:TIME"); + break; + + case END: + sender.sendMessage("The match has ended! Would you like to restart using current settings?"); + break; + + default: + sender.sendMessage("You cannot start a match now, one is already in progress!"); + + + } + + return false; + + + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String GetCommandPath() { + return "startmatch"; + } + + @Override + public boolean GetPlayerOnly() { + return true; + } + + @Override + public boolean GetModOnly() { + // TODO Auto-generated method stub + return false; + } +} diff --git a/src/alisolarflare/uhc/listeners/MatchCyclingListener.java b/src/alisolarflare/autouhc/listeners/MatchCyclingListener.java similarity index 89% rename from src/alisolarflare/uhc/listeners/MatchCyclingListener.java rename to src/alisolarflare/autouhc/listeners/MatchCyclingListener.java index 62265c2..e11fc9b 100644 --- a/src/alisolarflare/uhc/listeners/MatchCyclingListener.java +++ b/src/alisolarflare/autouhc/listeners/MatchCyclingListener.java @@ -1,4 +1,4 @@ -package alisolarflare.uhc.listeners; +package alisolarflare.autouhc.listeners; import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/alisolarflare/uhc/listeners/MatchMainLoop.java b/src/alisolarflare/autouhc/listeners/MatchMainLoop.java similarity index 72% rename from src/alisolarflare/uhc/listeners/MatchMainLoop.java rename to src/alisolarflare/autouhc/listeners/MatchMainLoop.java index 2e42cae..41c3b06 100644 --- a/src/alisolarflare/uhc/listeners/MatchMainLoop.java +++ b/src/alisolarflare/autouhc/listeners/MatchMainLoop.java @@ -1,4 +1,4 @@ -package alisolarflare.uhc.listeners; +package alisolarflare.autouhc.listeners; import org.bukkit.scheduler.BukkitRunnable; diff --git a/src/alisolarflare/uhc/memory/MatchState.java b/src/alisolarflare/autouhc/memory/MatchState.java similarity index 87% rename from src/alisolarflare/uhc/memory/MatchState.java rename to src/alisolarflare/autouhc/memory/MatchState.java index bf6d77d..f25c350 100644 --- a/src/alisolarflare/uhc/memory/MatchState.java +++ b/src/alisolarflare/autouhc/memory/MatchState.java @@ -1,4 +1,4 @@ -package alisolarflare.uhc.memory; +package alisolarflare.autouhc.memory; public enum MatchState { IDLE, //Idle: Configure Match, Wait: Schedule Match, Intro: Start Match diff --git a/src/alisolarflare/uhc/memory/UHCMatch.java b/src/alisolarflare/autouhc/memory/UHCMatch.java similarity index 92% rename from src/alisolarflare/uhc/memory/UHCMatch.java rename to src/alisolarflare/autouhc/memory/UHCMatch.java index 1583eef..ee8911d 100644 --- a/src/alisolarflare/uhc/memory/UHCMatch.java +++ b/src/alisolarflare/autouhc/memory/UHCMatch.java @@ -1,4 +1,4 @@ -package alisolarflare.uhc.memory; +package alisolarflare.autouhc.memory; import java.util.ArrayList; import java.util.List; diff --git a/src/alisolarflare/easyuhc/EasyUHCModule.java b/src/alisolarflare/easyuhc/EasyUHCModule.java new file mode 100644 index 0000000..408e909 --- /dev/null +++ b/src/alisolarflare/easyuhc/EasyUHCModule.java @@ -0,0 +1,24 @@ +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()); + } +} diff --git a/src/alisolarflare/easyuhc/commands/ActivatePowers.java b/src/alisolarflare/easyuhc/commands/ActivatePowers.java new file mode 100644 index 0000000..737ac72 --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/ActivatePowers.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/SetupWorldBorders.java b/src/alisolarflare/easyuhc/commands/SetupWorldBorders.java new file mode 100644 index 0000000..ef90ae8 --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/SetupWorldBorders.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java b/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java new file mode 100644 index 0000000..bd083a6 --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/SpreadPlayers.java b/src/alisolarflare/easyuhc/commands/SpreadPlayers.java new file mode 100644 index 0000000..a5798ac --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/SpreadPlayers.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/StartTimer.java b/src/alisolarflare/easyuhc/commands/StartTimer.java new file mode 100644 index 0000000..927344e --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/StartTimer.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/StartUHC.java b/src/alisolarflare/easyuhc/commands/StartUHC.java new file mode 100644 index 0000000..2a06889 --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/StartUHC.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/easyuhc/commands/TeleportToUHC.java b/src/alisolarflare/easyuhc/commands/TeleportToUHC.java new file mode 100644 index 0000000..5a5c6d0 --- /dev/null +++ b/src/alisolarflare/easyuhc/commands/TeleportToUHC.java @@ -0,0 +1,33 @@ +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; + } + +} diff --git a/src/alisolarflare/uhc/UHCModule.java b/src/alisolarflare/uhc/UHCModule.java deleted file mode 100644 index 1f1b5e4..0000000 --- a/src/alisolarflare/uhc/UHCModule.java +++ /dev/null @@ -1,36 +0,0 @@ -package alisolarflare.uhc; - -import org.bukkit.plugin.java.JavaPlugin; - -import alisolarflare.Module; -import alisolarflare.uhc.controller.SetMatchState; -import alisolarflare.uhc.idle.AddToUHC; -import alisolarflare.uhc.idle.JoinUHC; -import alisolarflare.uhc.intro.ConfigureMatch; -import alisolarflare.uhc.intro.ScheduleMatch; -import alisolarflare.uhc.intro.StartMatch; -import alisolarflare.uhc.memory.MatchState; -import alisolarflare.uhc.memory.UHCMatch; - -public class UHCModule extends Module { - public UHCMatch match; - - public void register(JavaPlugin plugin) { - - - if (plugin.getConfig().contains("UHCMatchState")){ - match = new UHCMatch(plugin.getConfig(), MatchState.valueOf(plugin.getConfig().getString("UHCMatchState"))); - }else{ - match = new UHCMatch(plugin.getConfig(), MatchState.IDLE); - } - - - registerCommand(plugin, new SetMatchState(match)); - registerCommand(plugin, new AddToUHC(match)); - registerCommand(plugin, new JoinUHC(match)); - registerCommand(plugin, new StartMatch(match)); - registerCommand(plugin, new ConfigureMatch(match)); - registerCommand(plugin, new ScheduleMatch(match)); - - } -}