From 63a6c775a4e9dfff78f68d5ca59207ad903acf44 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 24 Nov 2016 21:48:10 -0500 Subject: [PATCH] Re-did how OnCommand works in AliPresents Removed CommandSender sender for all Player and Mod Commands, replaced with Player player --- src/alisolarflare/components/ModCommand.java | 13 +-- .../components/PlayerCommand.java | 8 ++ .../components/bankchest/CreateBankChest.java | 6 +- .../creativeboundaries/commands/Cbgm0.java | 9 +- .../creativeboundaries/commands/Cbgm1.java | 6 +- .../easyuhc/commands/ActivatePowers.java | 4 +- .../flairdoor/commands/FlairMe.java | 7 +- .../components/gpowers/commands/GPower.java | 4 +- .../components/insurance/getInsurance.java | 5 +- .../components/insurance/getInsuranceBar.java | 4 +- .../insurance/getInsuranceBlock.java | 4 +- .../insurance/getInsuranceNugget.java | 4 +- .../components/magic/tricks/BoomBowRule.java | 8 +- .../metrics/commands/GetLoginMetrics.java | 7 +- .../minigames/commands/JoinMinigame.java | 10 +- .../minigames/commands/LeaveMinigame.java | 13 +-- .../minigames/commands/ListFighters.java | 6 +- src/graveyard/autouhc/idle/AddToUHC.java | 110 +++++++++--------- src/graveyard/autouhc/idle/JoinUHC.java | 96 +++++++-------- .../autouhc/intro/ConfigureMatch.java | 38 +++--- .../autouhc/intro/IntroductionCutscene.java | 10 +- .../listeners/MatchCyclingListener.java | 38 +++--- .../autouhc/listeners/MatchMainLoop.java | 24 ++-- src/graveyard/autouhc/memory/MatchState.java | 24 ++-- 24 files changed, 213 insertions(+), 245 deletions(-) diff --git a/src/alisolarflare/components/ModCommand.java b/src/alisolarflare/components/ModCommand.java index ddc0940..6813f4f 100644 --- a/src/alisolarflare/components/ModCommand.java +++ b/src/alisolarflare/components/ModCommand.java @@ -1,11 +1,6 @@ package alisolarflare.components; -import org.bukkit.command.CommandSender; - -public abstract class ModCommand extends BaseCommand{ - - @Override - public abstract boolean OnCommand(CommandSender sender, String alias, String[] args); +public abstract class ModCommand extends PlayerCommand{ @Override public String[] GetHelpText(String alias){ @@ -15,12 +10,6 @@ public abstract class ModCommand extends BaseCommand{ }; } - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return true; - } - @Override public boolean GetModOnly() { // TODO Auto-generated method stub diff --git a/src/alisolarflare/components/PlayerCommand.java b/src/alisolarflare/components/PlayerCommand.java index 201c275..9fa4439 100644 --- a/src/alisolarflare/components/PlayerCommand.java +++ b/src/alisolarflare/components/PlayerCommand.java @@ -1,6 +1,14 @@ package alisolarflare.components; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + public abstract class PlayerCommand extends BaseCommand{ + @Override + public boolean OnCommand(CommandSender sender, String alias, String[] args){ + return OnCommand((Player) sender, alias, args); + } + public abstract boolean OnCommand(Player player, String alias, String[] args); @Override public boolean GetPlayerOnly() { // TODO Auto-generated method stub diff --git a/src/alisolarflare/components/bankchest/CreateBankChest.java b/src/alisolarflare/components/bankchest/CreateBankChest.java index deb1c9a..41c85c6 100644 --- a/src/alisolarflare/components/bankchest/CreateBankChest.java +++ b/src/alisolarflare/components/bankchest/CreateBankChest.java @@ -1,15 +1,15 @@ package alisolarflare.components.bankchest; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; public class CreateBankChest extends ModCommand { @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { + public boolean OnCommand(Player player, String alias, String[] args) { // TODO Auto-generated method stub return false; } -} +} diff --git a/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java b/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java index b1e597b..607dc8f 100644 --- a/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java +++ b/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java @@ -3,7 +3,6 @@ package alisolarflare.components.creativeboundaries.commands; import java.util.List; import org.bukkit.GameMode; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; @@ -18,13 +17,7 @@ public class Cbgm0 extends PlayerCommand{ } @Override - public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) { - if (!(sender instanceof Player)){ - sender.sendMessage("You must be a player to use this command!"); - return false; - } - - Player player = (Player) sender; + public boolean OnCommand(Player player, String arg2, String[] arg3) { player.setGameMode(GameMode.SURVIVAL); cbCreatives.remove(player); return true; diff --git a/src/alisolarflare/components/creativeboundaries/commands/Cbgm1.java b/src/alisolarflare/components/creativeboundaries/commands/Cbgm1.java index 845de5e..5416aba 100644 --- a/src/alisolarflare/components/creativeboundaries/commands/Cbgm1.java +++ b/src/alisolarflare/components/creativeboundaries/commands/Cbgm1.java @@ -3,7 +3,6 @@ package alisolarflare.components.creativeboundaries.commands; import java.util.List; import org.bukkit.GameMode; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import com.palmergames.bukkit.towny.exceptions.NotRegisteredException; @@ -24,10 +23,7 @@ public class Cbgm1 extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) { - - - Player player = (Player) sender; + public boolean OnCommand(Player player, String arg2, String[] arg3) { TownBlock tb = TownyUniverse.getTownBlock(player.getLocation()); if (tb == null) { diff --git a/src/alisolarflare/components/easyuhc/commands/ActivatePowers.java b/src/alisolarflare/components/easyuhc/commands/ActivatePowers.java index 7c19b02..0933d54 100644 --- a/src/alisolarflare/components/easyuhc/commands/ActivatePowers.java +++ b/src/alisolarflare/components/easyuhc/commands/ActivatePowers.java @@ -1,13 +1,13 @@ package alisolarflare.components.easyuhc.commands; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; public class ActivatePowers extends ModCommand{ @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { + public boolean OnCommand(Player player, String alias, String[] args) { return false; } } diff --git a/src/alisolarflare/components/flairdoor/commands/FlairMe.java b/src/alisolarflare/components/flairdoor/commands/FlairMe.java index d854304..822a43a 100644 --- a/src/alisolarflare/components/flairdoor/commands/FlairMe.java +++ b/src/alisolarflare/components/flairdoor/commands/FlairMe.java @@ -1,6 +1,5 @@ package alisolarflare.components.flairdoor.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; @@ -13,9 +12,9 @@ public class FlairMe extends PlayerCommand { this.component = flairDoorComponent; } @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - component.playersToBeFlaired.add((Player) sender); - sender.sendMessage("Setup Successful! Walk through a portal to get your flair"); + public boolean OnCommand(Player player, String label, String[] args) { + component.playersToBeFlaired.add(player); + player.sendMessage("Setup Successful! Walk through a portal to get your flair"); return true; } @Override diff --git a/src/alisolarflare/components/gpowers/commands/GPower.java b/src/alisolarflare/components/gpowers/commands/GPower.java index 3a2561d..ae5870d 100644 --- a/src/alisolarflare/components/gpowers/commands/GPower.java +++ b/src/alisolarflare/components/gpowers/commands/GPower.java @@ -1,6 +1,5 @@ package alisolarflare.components.gpowers.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; @@ -15,8 +14,7 @@ public class GPower extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - Player player = (Player) sender; + public boolean OnCommand(Player player, String label, String[] args) { if (args.length < 2) { player.sendMessage("Proper Usage to test G-Powers:"); player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]"); diff --git a/src/alisolarflare/components/insurance/getInsurance.java b/src/alisolarflare/components/insurance/getInsurance.java index f5ed916..642f953 100644 --- a/src/alisolarflare/components/insurance/getInsurance.java +++ b/src/alisolarflare/components/insurance/getInsurance.java @@ -1,7 +1,6 @@ package alisolarflare.components.insurance; import org.apache.commons.lang.StringUtils; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -11,9 +10,7 @@ public class getInsurance extends ModCommand { private final int defaultAmount = 1; private final InsuranceType defaultInsuranceType = InsuranceType.Block; @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - Player player = (Player) sender; - + public boolean OnCommand(Player player, String alias, String[] args) { int amount = defaultAmount; InsuranceType insuranceType = defaultInsuranceType; diff --git a/src/alisolarflare/components/insurance/getInsuranceBar.java b/src/alisolarflare/components/insurance/getInsuranceBar.java index 4e7a95f..ec5341f 100644 --- a/src/alisolarflare/components/insurance/getInsuranceBar.java +++ b/src/alisolarflare/components/insurance/getInsuranceBar.java @@ -1,7 +1,6 @@ package alisolarflare.components.insurance; import org.apache.commons.lang3.StringUtils; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -10,8 +9,7 @@ import alisolarflare.components.insurance.Insurance.InsuranceType; public class getInsuranceBar extends ModCommand { @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - Player player = (Player) sender; + public boolean OnCommand(Player player, String alias, String[] args) { if (args.length > 0 && StringUtils.isNumeric(args[0])){ player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Ingot, Integer.parseInt(args[0]))); }else{ diff --git a/src/alisolarflare/components/insurance/getInsuranceBlock.java b/src/alisolarflare/components/insurance/getInsuranceBlock.java index 29ef322..401760b 100644 --- a/src/alisolarflare/components/insurance/getInsuranceBlock.java +++ b/src/alisolarflare/components/insurance/getInsuranceBlock.java @@ -1,7 +1,6 @@ package alisolarflare.components.insurance; import org.apache.commons.lang3.StringUtils; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -10,8 +9,7 @@ import alisolarflare.components.insurance.Insurance.InsuranceType; public class getInsuranceBlock extends ModCommand { @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - Player player = (Player) sender; + public boolean OnCommand(Player player, String alias, String[] args) { if (args.length > 0 && StringUtils.isNumeric(args[0])){ player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Block, Integer.parseInt(args[0]))); }else{ diff --git a/src/alisolarflare/components/insurance/getInsuranceNugget.java b/src/alisolarflare/components/insurance/getInsuranceNugget.java index e6de4f4..9f38bfa 100644 --- a/src/alisolarflare/components/insurance/getInsuranceNugget.java +++ b/src/alisolarflare/components/insurance/getInsuranceNugget.java @@ -1,7 +1,6 @@ package alisolarflare.components.insurance; import org.apache.commons.lang3.StringUtils; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -10,8 +9,7 @@ import alisolarflare.components.insurance.Insurance.InsuranceType; public class getInsuranceNugget extends ModCommand { @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - Player player = (Player) sender; + public boolean OnCommand(Player player, String alias, String[] args) { if (args.length > 0 && StringUtils.isNumeric(args[0])){ player.getInventory().addItem(Insurance.getInsurance(InsuranceType.Nugget, Integer.parseInt(args[0]))); }else{ diff --git a/src/alisolarflare/components/magic/tricks/BoomBowRule.java b/src/alisolarflare/components/magic/tricks/BoomBowRule.java index 44cea27..ca81e35 100644 --- a/src/alisolarflare/components/magic/tricks/BoomBowRule.java +++ b/src/alisolarflare/components/magic/tricks/BoomBowRule.java @@ -1,6 +1,5 @@ package alisolarflare.components.magic.tricks; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -11,12 +10,7 @@ public class BoomBowRule extends ModCommand{ public static boolean endCrystal; public static boolean localized;; @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - if (sender instanceof Player == false){ - sender.sendMessage("You must be a player to use this command"); - return false; - } - Player player = (Player) sender; + public boolean OnCommand(Player player, String label, String[] args) { if (player.getName().equals("alisolarflare") == false){ player.sendMessage("You must be alisolarflare to use this command"); return false; diff --git a/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java b/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java index 9536258..d05a2fd 100644 --- a/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java +++ b/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java @@ -1,6 +1,5 @@ package alisolarflare.components.metrics.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -15,11 +14,13 @@ public class GetLoginMetrics extends ModCommand{ } @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - Player player = (Player) sender; + public boolean OnCommand(Player player, String alias, String[] args) { for (String metric : module.metricsList){ player.sendMessage(metric); } + if (args.length < 1){ + return true; + } return true; } } diff --git a/src/alisolarflare/components/minigames/commands/JoinMinigame.java b/src/alisolarflare/components/minigames/commands/JoinMinigame.java index f7169d5..f3ef12f 100644 --- a/src/alisolarflare/components/minigames/commands/JoinMinigame.java +++ b/src/alisolarflare/components/minigames/commands/JoinMinigame.java @@ -1,6 +1,6 @@ package alisolarflare.components.minigames.commands; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; import alisolarflare.components.minigames.MinigameComponent; @@ -13,17 +13,17 @@ public class JoinMinigame extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) { - String name = sender.getName(); + public boolean OnCommand(Player player, String arg2, String[] arg3) { + String name = player.getName(); if (module.fighters.contains(name)) { - sender.sendMessage("You are already in the minigame!"); + player.sendMessage("You are already in the minigame!"); return true; } module.fighters.add(name); if (module.fighters.contains(name)) { - sender.sendMessage("You have joined the minigame!"); + player.sendMessage("You have joined the minigame!"); } return true; } diff --git a/src/alisolarflare/components/minigames/commands/LeaveMinigame.java b/src/alisolarflare/components/minigames/commands/LeaveMinigame.java index c286607..5592fdb 100644 --- a/src/alisolarflare/components/minigames/commands/LeaveMinigame.java +++ b/src/alisolarflare/components/minigames/commands/LeaveMinigame.java @@ -1,6 +1,5 @@ package alisolarflare.components.minigames.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; @@ -15,21 +14,21 @@ public class LeaveMinigame extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) { - if(!(sender instanceof Player)) - sender.sendMessage("You must be a player to use this command!"); + public boolean OnCommand(Player player, String arg2, String[] arg3) { + if(!(player instanceof Player)) + player.sendMessage("You must be a player to use this command!"); - String name = sender.getName(); + String name = player.getName(); if (!(module.fighters.contains(name))) { - sender.sendMessage("You are not fighting!"); + player.sendMessage("You are not fighting!"); return true; } while(module.fighters.contains(name)){ module.fighters.remove(name); } - sender.sendMessage("You have left the fighters category!"); + player.sendMessage("You have left the fighters category!"); return true; } diff --git a/src/alisolarflare/components/minigames/commands/ListFighters.java b/src/alisolarflare/components/minigames/commands/ListFighters.java index 613d1fd..ba63a5b 100644 --- a/src/alisolarflare/components/minigames/commands/ListFighters.java +++ b/src/alisolarflare/components/minigames/commands/ListFighters.java @@ -1,6 +1,6 @@ package alisolarflare.components.minigames.commands; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; import alisolarflare.components.minigames.MinigameComponent; @@ -13,8 +13,8 @@ public class ListFighters extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) { - sender.sendMessage(lobby.fighters.toString()); + public boolean OnCommand(Player player, String arg2, String[] arg3) { + player.sendMessage(lobby.fighters.toString()); return true; } @Override diff --git a/src/graveyard/autouhc/idle/AddToUHC.java b/src/graveyard/autouhc/idle/AddToUHC.java index 030fb85..9c4de01 100644 --- a/src/graveyard/autouhc/idle/AddToUHC.java +++ b/src/graveyard/autouhc/idle/AddToUHC.java @@ -1,55 +1,55 @@ -package graveyard.autouhc.idle; - -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import alisolarflare.components.ModCommand; -import graveyard.autouhc.memory.UHCMatch; - -/** - * This class handles the specific command /addToUHC which, in-game, adds a player to a specific UltraHardcore match, that is defined by the constructor: {@linkplain #AddToUHC(UHCMatch)} - * - * @author Alisolarflare - */ -/**@deprecated*/ -public class AddToUHC extends ModCommand { - private UHCMatch match; - - public AddToUHC(UHCMatch match) { - this.match = match; - } - - @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - // INPUT SANITATION - Player player = (Player) sender; - if (!player.getName().equalsIgnoreCase("alisolarflare") && !player.getName().equalsIgnoreCase("Arsen_Derby_FTW")) { - sender.sendMessage("You must be Ali to add someone else to a UHC, send her a message to change the permissions"); - return false; - } - if (args.length <= 1) { - sender.sendMessage("You must supply at least one playername"); - } - - switch(match.getMatchState()){ - case IDLE: - case WAITING: - case SETUP: - case INTRO: - // Adds players to memory - sender.sendMessage("Adding Players to matchList!"); - for (int i = 0; i > args.length; i++) { - match.getPlayerList().add(args[i]); - }sender.sendMessage("Finished!"); - case PEACE: - case TENSION: - case POWER: - case END: - sender.sendMessage("There is already a match going on!"); - } - - - - return false; - } -} +//package graveyard.autouhc.idle; +// +//import org.bukkit.command.CommandSender; +//import org.bukkit.entity.Player; +// +//import alisolarflare.components.ModCommand; +//import graveyard.autouhc.memory.UHCMatch; +// +///** +// * This class handles the specific command /addToUHC which, in-game, adds a player to a specific UltraHardcore match, that is defined by the constructor: {@linkplain #AddToUHC(UHCMatch)} +// * +// * @author Alisolarflare +// */ +///**@deprecated*/ +//public class AddToUHC extends ModCommand { +// private UHCMatch match; +// +// public AddToUHC(UHCMatch match) { +// this.match = match; +// } +// +// @Override +// public boolean OnCommand(CommandSender sender, String label, String[] args) { +// // INPUT SANITATION +// Player player = (Player) sender; +// if (!player.getName().equalsIgnoreCase("alisolarflare") && !player.getName().equalsIgnoreCase("Arsen_Derby_FTW")) { +// sender.sendMessage("You must be Ali to add someone else to a UHC, send her a message to change the permissions"); +// return false; +// } +// if (args.length <= 1) { +// sender.sendMessage("You must supply at least one playername"); +// } +// +// switch(match.getMatchState()){ +// case IDLE: +// case WAITING: +// case SETUP: +// case INTRO: +// // Adds players to memory +// sender.sendMessage("Adding Players to matchList!"); +// for (int i = 0; i > args.length; i++) { +// match.getPlayerList().add(args[i]); +// }sender.sendMessage("Finished!"); +// case PEACE: +// case TENSION: +// case POWER: +// case END: +// sender.sendMessage("There is already a match going on!"); +// } +// +// +// +// return false; +// } +//} diff --git a/src/graveyard/autouhc/idle/JoinUHC.java b/src/graveyard/autouhc/idle/JoinUHC.java index f1a09a1..1236cd9 100644 --- a/src/graveyard/autouhc/idle/JoinUHC.java +++ b/src/graveyard/autouhc/idle/JoinUHC.java @@ -1,48 +1,48 @@ -package graveyard.autouhc.idle; - -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import alisolarflare.components.ModCommand; -import graveyard.autouhc.memory.UHCMatch; -/**@deprecated*/ -public class JoinUHC extends ModCommand{ - - private UHCMatch match; - - public JoinUHC(UHCMatch match) { - this.match = match; - } - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - if (!(sender instanceof Player)) - return false; - Player player = (Player) sender; - player.sendMessage("Adding you to the UltraHardcore match!"); - switch(match.getMatchState()){ - - //Before the game - case IDLE: - case WAITING: - case SETUP: - case INTRO: - player.sendMessage("Adding you to the UltraHardcore match!"); - match.getPlayerList().add(player.getName()); - break; - - //During the game - case PEACE: - case TENSION: - case POWER: - player.sendMessage("There is currently an UltraHardcore match going on! #POINTTOSPECTATORMODE, tell Ali asap if you see this"); - - //After the game - case END: - player.sendMessage("There is currently an ending ceremony going on! #POINTTOCEREMONY, tell Ali ASAP if you see this"); - - } - - return false; - } -} +//package graveyard.autouhc.idle; +// +//import org.bukkit.command.CommandSender; +//import org.bukkit.entity.Player; +// +//import alisolarflare.components.ModCommand; +//import graveyard.autouhc.memory.UHCMatch; +///**@deprecated*/ +//public class JoinUHC extends ModCommand{ +// +// private UHCMatch match; +// +// public JoinUHC(UHCMatch match) { +// this.match = match; +// } +// +// @Override +// public boolean OnCommand(CommandSender sender, String alias, String[] args) { +// if (!(sender instanceof Player)) +// return false; +// Player player = (Player) sender; +// player.sendMessage("Adding you to the UltraHardcore match!"); +// switch(match.getMatchState()){ +// +// //Before the game +// case IDLE: +// case WAITING: +// case SETUP: +// case INTRO: +// player.sendMessage("Adding you to the UltraHardcore match!"); +// match.getPlayerList().add(player.getName()); +// break; +// +// //During the game +// case PEACE: +// case TENSION: +// case POWER: +// player.sendMessage("There is currently an UltraHardcore match going on! #POINTTOSPECTATORMODE, tell Ali asap if you see this"); +// +// //After the game +// case END: +// player.sendMessage("There is currently an ending ceremony going on! #POINTTOCEREMONY, tell Ali ASAP if you see this"); +// +// } +// +// return false; +// } +//} diff --git a/src/graveyard/autouhc/intro/ConfigureMatch.java b/src/graveyard/autouhc/intro/ConfigureMatch.java index 50ac73d..be784c8 100644 --- a/src/graveyard/autouhc/intro/ConfigureMatch.java +++ b/src/graveyard/autouhc/intro/ConfigureMatch.java @@ -1,19 +1,19 @@ -package graveyard.autouhc.intro; - -import org.bukkit.command.CommandSender; - -import alisolarflare.components.ModCommand; -import graveyard.autouhc.memory.UHCMatch; -/**@deprecated*/ -public class ConfigureMatch extends ModCommand{ - - public ConfigureMatch(UHCMatch match) { - // TODO Auto-generated constructor stub - } - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } -} +//package graveyard.autouhc.intro; +// +//import org.bukkit.command.CommandSender; +// +//import alisolarflare.components.ModCommand; +//import graveyard.autouhc.memory.UHCMatch; +///**@deprecated*/ +//public class ConfigureMatch extends ModCommand{ +// +// public ConfigureMatch(UHCMatch match) { +// // TODO Auto-generated constructor stub +// } +// +// @Override +// public boolean OnCommand(CommandSender sender, String alias, String[] args) { +// // TODO Auto-generated method stub +// return false; +// } +//} diff --git a/src/graveyard/autouhc/intro/IntroductionCutscene.java b/src/graveyard/autouhc/intro/IntroductionCutscene.java index e548dc8..376c3d5 100644 --- a/src/graveyard/autouhc/intro/IntroductionCutscene.java +++ b/src/graveyard/autouhc/intro/IntroductionCutscene.java @@ -1,5 +1,5 @@ -package graveyard.autouhc.intro; -/**@deprecated*/ -public class IntroductionCutscene { - //TODO: Teleport all players to the area. -} +//package graveyard.autouhc.intro; +///**@deprecated*/ +//public class IntroductionCutscene { +// //TODO: Teleport all players to the area. +//} diff --git a/src/graveyard/autouhc/listeners/MatchCyclingListener.java b/src/graveyard/autouhc/listeners/MatchCyclingListener.java index c15fbcd..5ee5bfc 100644 --- a/src/graveyard/autouhc/listeners/MatchCyclingListener.java +++ b/src/graveyard/autouhc/listeners/MatchCyclingListener.java @@ -1,19 +1,19 @@ -package graveyard.autouhc.listeners; - -import org.bukkit.event.Listener; -import org.bukkit.plugin.java.JavaPlugin; -import org.bukkit.scheduler.BukkitTask; - -/** - * Main launcher for the repeating task that activates the - * ghostie powers if an Ultrahardcore Match is going on, - * and it's time for powers to activate - */ -/**@deprecated*/ -public class MatchCyclingListener implements Listener { - public BukkitTask PowerCyclingTask; - - public MatchCyclingListener(JavaPlugin plugin){ - PowerCyclingTask = (new MatchMainLoop()).runTaskTimer(plugin, 20, 20); - } -} +//package graveyard.autouhc.listeners; +// +//import org.bukkit.event.Listener; +//import org.bukkit.plugin.java.JavaPlugin; +//import org.bukkit.scheduler.BukkitTask; +// +///** +// * Main launcher for the repeating task that activates the +// * ghostie powers if an Ultrahardcore Match is going on, +// * and it's time for powers to activate +// */ +///**@deprecated*/ +//public class MatchCyclingListener implements Listener { +// public BukkitTask PowerCyclingTask; +// +// public MatchCyclingListener(JavaPlugin plugin){ +// PowerCyclingTask = (new MatchMainLoop()).runTaskTimer(plugin, 20, 20); +// } +//} diff --git a/src/graveyard/autouhc/listeners/MatchMainLoop.java b/src/graveyard/autouhc/listeners/MatchMainLoop.java index e300596..6b10fb6 100644 --- a/src/graveyard/autouhc/listeners/MatchMainLoop.java +++ b/src/graveyard/autouhc/listeners/MatchMainLoop.java @@ -1,12 +1,12 @@ -package graveyard.autouhc.listeners; - -import org.bukkit.scheduler.BukkitRunnable; -/**@deprecated*/ -public class MatchMainLoop extends BukkitRunnable{ - @Override - public void run() { - - } - - -} +//package graveyard.autouhc.listeners; +// +//import org.bukkit.scheduler.BukkitRunnable; +///**@deprecated*/ +//public class MatchMainLoop extends BukkitRunnable{ +// @Override +// public void run() { +// +// } +// +// +//} diff --git a/src/graveyard/autouhc/memory/MatchState.java b/src/graveyard/autouhc/memory/MatchState.java index 68a6c48..f309e8b 100644 --- a/src/graveyard/autouhc/memory/MatchState.java +++ b/src/graveyard/autouhc/memory/MatchState.java @@ -1,12 +1,12 @@ -package graveyard.autouhc.memory; -/**@deprecated*/ -public enum MatchState { - IDLE, //Idle: Configure Match, Wait: Schedule Match, Intro: Start Match - WAITING, //SETUP: Scheduled Time, INTRO: No Setup - SETUP, //INTRO: Done - INTRO, //Peace: Done, and players ready - PEACE, //Tension: Timer, End: All dead - TENSION, //Power: Timer, End: All dead - POWER, //End: All dead - END//IDLE: Ceremony over -} +//package graveyard.autouhc.memory; +///**@deprecated*/ +//public enum MatchState { +// IDLE, //Idle: Configure Match, Wait: Schedule Match, Intro: Start Match +// WAITING, //SETUP: Scheduled Time, INTRO: No Setup +// SETUP, //INTRO: Done +// INTRO, //Peace: Done, and players ready +// PEACE, //Tension: Timer, End: All dead +// TENSION, //Power: Timer, End: All dead +// POWER, //End: All dead +// END//IDLE: Ceremony over +//}