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
This commit is contained in:
parent
7bbcb7e5a0
commit
a81c0ceb76
22 changed files with 451 additions and 196 deletions
|
@ -10,9 +10,9 @@ import alisolarflare.components.flairdoor.FlairDoorModule;
|
||||||
import alisolarflare.components.gpowers.GPowerModule;
|
import alisolarflare.components.gpowers.GPowerModule;
|
||||||
import alisolarflare.components.links.AliLinkModule;
|
import alisolarflare.components.links.AliLinkModule;
|
||||||
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
||||||
|
import alisolarflare.easyuhc.EasyUHCModule;
|
||||||
import alisolarflare.magic.MagicModule;
|
import alisolarflare.magic.MagicModule;
|
||||||
import alisolarflare.minigames.MinigameModule;
|
import alisolarflare.minigames.MinigameModule;
|
||||||
import alisolarflare.uhc.UHCModule;
|
|
||||||
|
|
||||||
public class AliPresents extends JavaPlugin{
|
public class AliPresents extends JavaPlugin{
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
|
@ -25,7 +25,7 @@ public class AliPresents extends JavaPlugin{
|
||||||
new FlairDoorModule().register(this);
|
new FlairDoorModule().register(this);
|
||||||
new GPowerModule().register(this);
|
new GPowerModule().register(this);
|
||||||
new AliLinkModule().register(this);
|
new AliLinkModule().register(this);
|
||||||
new UHCModule().register(this);
|
new EasyUHCModule().register(this);
|
||||||
new MagicModule().register(this);
|
new MagicModule().register(this);
|
||||||
new MinigameModule().register(this);
|
new MinigameModule().register(this);
|
||||||
new CreativeBoundariesModule().register(this);
|
new CreativeBoundariesModule().register(this);
|
||||||
|
|
36
src/alisolarflare/autouhc/UHCModule.java
Normal file
36
src/alisolarflare/autouhc/UHCModule.java
Normal file
|
@ -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));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.uhc.controller;
|
package alisolarflare.autouhc.controller;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.uhc.memory.MatchState;
|
import alisolarflare.autouhc.memory.MatchState;
|
||||||
import alisolarflare.uhc.memory.UHCMatch;
|
import alisolarflare.autouhc.memory.UHCMatch;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class SetMatchState extends TBMCCommandBase{
|
public class SetMatchState extends TBMCCommandBase{
|
|
@ -1,9 +1,9 @@
|
||||||
package alisolarflare.uhc.idle;
|
package alisolarflare.autouhc.idle;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.uhc.memory.UHCMatch;
|
import alisolarflare.autouhc.memory.UHCMatch;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,9 +1,9 @@
|
||||||
package alisolarflare.uhc.idle;
|
package alisolarflare.autouhc.idle;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.uhc.memory.UHCMatch;
|
import alisolarflare.autouhc.memory.UHCMatch;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class JoinUHC extends TBMCCommandBase{
|
public class JoinUHC extends TBMCCommandBase{
|
|
@ -1,38 +1,38 @@
|
||||||
package alisolarflare.uhc.intro;
|
package alisolarflare.autouhc.intro;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import alisolarflare.uhc.memory.UHCMatch;
|
import alisolarflare.autouhc.memory.UHCMatch;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class ConfigureMatch extends TBMCCommandBase{
|
public class ConfigureMatch extends TBMCCommandBase{
|
||||||
|
|
||||||
public ConfigureMatch(UHCMatch match) {
|
public ConfigureMatch(UHCMatch match) {
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] GetHelpText(String alias) {
|
public String[] GetHelpText(String alias) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean GetPlayerOnly() {
|
public boolean GetPlayerOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean GetModOnly() {
|
public boolean GetModOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package alisolarflare.uhc.intro;
|
package alisolarflare.autouhc.intro;
|
||||||
|
|
||||||
public class IntroductionCutscene {
|
public class IntroductionCutscene {
|
||||||
//TODO: Teleport all players to the area.
|
//TODO: Teleport all players to the area.
|
|
@ -1,38 +1,38 @@
|
||||||
package alisolarflare.uhc.intro;
|
package alisolarflare.autouhc.intro;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import alisolarflare.uhc.memory.UHCMatch;
|
import alisolarflare.autouhc.memory.UHCMatch;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class ScheduleMatch extends TBMCCommandBase{
|
public class ScheduleMatch extends TBMCCommandBase{
|
||||||
|
|
||||||
public ScheduleMatch(UHCMatch match) {
|
public ScheduleMatch(UHCMatch match) {
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] GetHelpText(String alias) {
|
public String[] GetHelpText(String alias) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean GetPlayerOnly() {
|
public boolean GetPlayerOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean GetModOnly() {
|
public boolean GetModOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,70 +1,70 @@
|
||||||
package alisolarflare.uhc.intro;
|
package alisolarflare.autouhc.intro;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import alisolarflare.uhc.memory.MatchState;
|
import alisolarflare.autouhc.memory.MatchState;
|
||||||
import alisolarflare.uhc.memory.UHCMatch;
|
import alisolarflare.autouhc.memory.UHCMatch;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class StartMatch extends TBMCCommandBase {
|
public class StartMatch extends TBMCCommandBase {
|
||||||
private UHCMatch match;
|
private UHCMatch match;
|
||||||
|
|
||||||
public StartMatch(UHCMatch match) {
|
public StartMatch(UHCMatch match) {
|
||||||
this.match = match;
|
this.match = match;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
|
|
||||||
if (!sender.hasPermission("moderator") && !(sender.getName() == ""))
|
if (!sender.hasPermission("moderator") && !(sender.getName() == ""))
|
||||||
sender.sendMessage("You must be a moderator or Arsenalis to use this command! "
|
sender.sendMessage("You must be a moderator or Arsenalis to use this command! "
|
||||||
+ "Contact a TBMC dev if you think this is wrong");
|
+ "Contact a TBMC dev if you think this is wrong");
|
||||||
|
|
||||||
//ACTIVATES MATCH
|
//ACTIVATES MATCH
|
||||||
switch(match.getMatchState()){
|
switch(match.getMatchState()){
|
||||||
case IDLE:
|
case IDLE:
|
||||||
sender.sendMessage("There is currently a match ready... Activating...");
|
sender.sendMessage("There is currently a match ready... Activating...");
|
||||||
match.setMatchState(MatchState.INTRO);
|
match.setMatchState(MatchState.INTRO);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WAITING:
|
case WAITING:
|
||||||
sender.sendMessage("There currently a match planned for: TIME:TIME:TIME");
|
sender.sendMessage("There currently a match planned for: TIME:TIME:TIME");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case END:
|
case END:
|
||||||
sender.sendMessage("The match has ended! Would you like to restart using current settings?");
|
sender.sendMessage("The match has ended! Would you like to restart using current settings?");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
sender.sendMessage("You cannot start a match now, one is already in progress!");
|
sender.sendMessage("You cannot start a match now, one is already in progress!");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] GetHelpText(String alias) {
|
public String[] GetHelpText(String alias) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String GetCommandPath() {
|
public String GetCommandPath() {
|
||||||
return "startmatch";
|
return "startmatch";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean GetPlayerOnly() {
|
public boolean GetPlayerOnly() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean GetModOnly() {
|
public boolean GetModOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package alisolarflare.uhc.listeners;
|
package alisolarflare.autouhc.listeners;
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
@ -1,4 +1,4 @@
|
||||||
package alisolarflare.uhc.listeners;
|
package alisolarflare.autouhc.listeners;
|
||||||
|
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package alisolarflare.uhc.memory;
|
package alisolarflare.autouhc.memory;
|
||||||
|
|
||||||
public enum MatchState {
|
public enum MatchState {
|
||||||
IDLE, //Idle: Configure Match, Wait: Schedule Match, Intro: Start Match
|
IDLE, //Idle: Configure Match, Wait: Schedule Match, Intro: Start Match
|
|
@ -1,4 +1,4 @@
|
||||||
package alisolarflare.uhc.memory;
|
package alisolarflare.autouhc.memory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
24
src/alisolarflare/easyuhc/EasyUHCModule.java
Normal file
24
src/alisolarflare/easyuhc/EasyUHCModule.java
Normal file
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/ActivatePowers.java
Normal file
33
src/alisolarflare/easyuhc/commands/ActivatePowers.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/SetupWorldBorders.java
Normal file
33
src/alisolarflare/easyuhc/commands/SetupWorldBorders.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java
Normal file
33
src/alisolarflare/easyuhc/commands/ShrinkWorldBorders.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/SpreadPlayers.java
Normal file
33
src/alisolarflare/easyuhc/commands/SpreadPlayers.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/StartTimer.java
Normal file
33
src/alisolarflare/easyuhc/commands/StartTimer.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/StartUHC.java
Normal file
33
src/alisolarflare/easyuhc/commands/StartUHC.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/alisolarflare/easyuhc/commands/TeleportToUHC.java
Normal file
33
src/alisolarflare/easyuhc/commands/TeleportToUHC.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue