From 6d0ee4e2245de7936664f055a30bf01af544c6d8 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 24 Nov 2016 21:48:27 -0500 Subject: [PATCH] commented out a *SHIT TON* of code --- .../alilinks/commands/PressAliLink.java | 8 +- .../alilinks/commands/SetAliLink.java | 9 +- .../commands/SetDickmode.java | 10 +- .../easyuhc/commands/SetUHCLobby.java | 5 +- .../easyuhc/commands/SetWorldBorders.java | 4 +- .../easyuhc/commands/ShrinkWorldBorders.java | 4 +- .../easyuhc/commands/SpreadPlayers.java | 4 +- .../easyuhc/commands/StartTimer.java | 4 +- .../components/easyuhc/commands/StartUHC.java | 4 +- .../easyuhc/commands/TeleportToUHC.java | 4 +- .../commands/SetProximityLocation.java | 7 +- .../components/gpowers/commands/PowerAll.java | 4 +- .../gpowers/commands/PowerDown.java | 4 +- .../components/gpowers/commands/PowerUp.java | 7 +- .../minigames/commands/SetColourSpawn.java | 31 ++-- src/graveyard/autouhc/UHCModule.java | 60 ++++---- .../autouhc/controller/SetMatchState.java | 142 +++++++++--------- .../autouhc/intro/ScheduleMatch.java | 38 ++--- src/graveyard/autouhc/intro/StartMatch.java | 104 ++++++------- src/graveyard/autouhc/memory/UHCMatch.java | 102 ++++++------- 20 files changed, 269 insertions(+), 286 deletions(-) diff --git a/src/alisolarflare/components/alilinks/commands/PressAliLink.java b/src/alisolarflare/components/alilinks/commands/PressAliLink.java index e68fdae..68c82fb 100644 --- a/src/alisolarflare/components/alilinks/commands/PressAliLink.java +++ b/src/alisolarflare/components/alilinks/commands/PressAliLink.java @@ -2,7 +2,7 @@ package alisolarflare.components.alilinks.commands; import java.util.List; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.components.PlayerCommand; @@ -18,9 +18,9 @@ public class PressAliLink extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String label, String[] inputFrequencies) { + public boolean OnCommand(Player player, String label, String[] inputFrequencies) { if (inputFrequencies.length < 1) { - sender.sendMessage("You must specify a link frequency"); + player.sendMessage("You must specify a link frequency"); return false; } @@ -31,7 +31,7 @@ public class PressAliLink extends PlayerCommand { } } } - sender.sendMessage("Link pressed!"); + player.sendMessage("Link pressed!"); return true; } @Override diff --git a/src/alisolarflare/components/alilinks/commands/SetAliLink.java b/src/alisolarflare/components/alilinks/commands/SetAliLink.java index 5aec78d..f253f31 100644 --- a/src/alisolarflare/components/alilinks/commands/SetAliLink.java +++ b/src/alisolarflare/components/alilinks/commands/SetAliLink.java @@ -5,7 +5,6 @@ import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.bukkit.World; -import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; @@ -24,12 +23,10 @@ public class SetAliLink extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - Player player = (Player) sender; - player.sendMessage("you pressed"); + public boolean OnCommand(Player player, String label, String[] args) { if (args == null || args.length < 1) { - sender.sendMessage("You must specify a link frequency"); - sender.sendMessage("/pressalilink [name]"); + player.sendMessage("You must specify a link frequency"); + player.sendMessage("/pressalilink [name]"); return false; } diff --git a/src/alisolarflare/components/creativeboundaries/commands/SetDickmode.java b/src/alisolarflare/components/creativeboundaries/commands/SetDickmode.java index 134ffb0..0d0c5ff 100644 --- a/src/alisolarflare/components/creativeboundaries/commands/SetDickmode.java +++ b/src/alisolarflare/components/creativeboundaries/commands/SetDickmode.java @@ -1,6 +1,6 @@ package alisolarflare.components.creativeboundaries.commands; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; import alisolarflare.components.creativeboundaries.CreativeBoundariesComponent; @@ -13,19 +13,19 @@ public class SetDickmode extends ModCommand{ } @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { + public boolean OnCommand(Player player, String label, String[] args) { if(args.length < 1){ - sender.sendMessage("You must use True, False, 1, or 0 as arguments!"); + player.sendMessage("You must use True, False, 1, or 0 as arguments!"); return false; } String firstArgument = args[0]; if(firstArgument.startsWith("t") || firstArgument.equals("1")){ - sender.sendMessage("Dickmode has been turned on!"); + player.sendMessage("Dickmode has been turned on!"); dickMode = true; return true; } if(firstArgument.startsWith("f") || firstArgument.equals("0")){ - sender.sendMessage("Dickmode has been turned off!"); + player.sendMessage("Dickmode has been turned off!"); dickMode = false; return true; } diff --git a/src/alisolarflare/components/easyuhc/commands/SetUHCLobby.java b/src/alisolarflare/components/easyuhc/commands/SetUHCLobby.java index 907a1b8..f7e6bd4 100644 --- a/src/alisolarflare/components/easyuhc/commands/SetUHCLobby.java +++ b/src/alisolarflare/components/easyuhc/commands/SetUHCLobby.java @@ -1,6 +1,5 @@ package alisolarflare.components.easyuhc.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -13,8 +12,8 @@ public class SetUHCLobby extends ModCommand{ } @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - module.lobbyLocation = ((Player) sender).getLocation(); + public boolean OnCommand(Player player, String alias, String[] args) { + module.lobbyLocation = player.getLocation(); return false; } diff --git a/src/alisolarflare/components/easyuhc/commands/SetWorldBorders.java b/src/alisolarflare/components/easyuhc/commands/SetWorldBorders.java index 69ff39a..24d5b2e 100644 --- a/src/alisolarflare/components/easyuhc/commands/SetWorldBorders.java +++ b/src/alisolarflare/components/easyuhc/commands/SetWorldBorders.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 SetWorldBorders 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/easyuhc/commands/ShrinkWorldBorders.java b/src/alisolarflare/components/easyuhc/commands/ShrinkWorldBorders.java index 4cf60d2..0f80ff7 100644 --- a/src/alisolarflare/components/easyuhc/commands/ShrinkWorldBorders.java +++ b/src/alisolarflare/components/easyuhc/commands/ShrinkWorldBorders.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 ShrinkWorldBorders 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/easyuhc/commands/SpreadPlayers.java b/src/alisolarflare/components/easyuhc/commands/SpreadPlayers.java index cb9e621..2c054b6 100644 --- a/src/alisolarflare/components/easyuhc/commands/SpreadPlayers.java +++ b/src/alisolarflare/components/easyuhc/commands/SpreadPlayers.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 SpreadPlayers 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/easyuhc/commands/StartTimer.java b/src/alisolarflare/components/easyuhc/commands/StartTimer.java index 9af948a..b7c09fe 100644 --- a/src/alisolarflare/components/easyuhc/commands/StartTimer.java +++ b/src/alisolarflare/components/easyuhc/commands/StartTimer.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 StartTimer 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/easyuhc/commands/StartUHC.java b/src/alisolarflare/components/easyuhc/commands/StartUHC.java index 04bb96a..334245c 100644 --- a/src/alisolarflare/components/easyuhc/commands/StartUHC.java +++ b/src/alisolarflare/components/easyuhc/commands/StartUHC.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 StartUHC 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/easyuhc/commands/TeleportToUHC.java b/src/alisolarflare/components/easyuhc/commands/TeleportToUHC.java index 856b4ab..8fe3876 100644 --- a/src/alisolarflare/components/easyuhc/commands/TeleportToUHC.java +++ b/src/alisolarflare/components/easyuhc/commands/TeleportToUHC.java @@ -1,13 +1,13 @@ package alisolarflare.components.easyuhc.commands; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.PlayerCommand; public class TeleportToUHC extends PlayerCommand{ @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/flairdoor/commands/SetProximityLocation.java b/src/alisolarflare/components/flairdoor/commands/SetProximityLocation.java index db57a00..8277889 100644 --- a/src/alisolarflare/components/flairdoor/commands/SetProximityLocation.java +++ b/src/alisolarflare/components/flairdoor/commands/SetProximityLocation.java @@ -1,6 +1,5 @@ package alisolarflare.components.flairdoor.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -15,13 +14,11 @@ public class SetProximityLocation extends ModCommand{ } @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { + public boolean OnCommand(Player player, String alias, String[] args) { if (args.length < 1){ - sender.sendMessage("You must enter an argument"); + player.sendMessage("You must enter an argument"); return false; } - - Player player = (Player) sender; String firstChar = args[0].substring(0, 1); switch(firstChar){ diff --git a/src/alisolarflare/components/gpowers/commands/PowerAll.java b/src/alisolarflare/components/gpowers/commands/PowerAll.java index e69874a..1203005 100644 --- a/src/alisolarflare/components/gpowers/commands/PowerAll.java +++ b/src/alisolarflare/components/gpowers/commands/PowerAll.java @@ -1,6 +1,6 @@ package alisolarflare.components.gpowers.commands; -import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; import alisolarflare.components.gpowers.GPowerMemory; @@ -13,7 +13,7 @@ public class PowerAll extends ModCommand{ this.gPowerMemory = gPowerMemory; } @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { + public boolean OnCommand(Player player, String alias, String[] args) { for (poweredPlayer poweredPlayer : gPowerMemory.poweredPlayerList.values()){ poweredPlayer.isPowersActive = true; } diff --git a/src/alisolarflare/components/gpowers/commands/PowerDown.java b/src/alisolarflare/components/gpowers/commands/PowerDown.java index 1dbe47b..d19c679 100644 --- a/src/alisolarflare/components/gpowers/commands/PowerDown.java +++ b/src/alisolarflare/components/gpowers/commands/PowerDown.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 PowerDown 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) { gPowerMemory.PowerDownPlayer(player); return true; } diff --git a/src/alisolarflare/components/gpowers/commands/PowerUp.java b/src/alisolarflare/components/gpowers/commands/PowerUp.java index 00de691..c64a623 100644 --- a/src/alisolarflare/components/gpowers/commands/PowerUp.java +++ b/src/alisolarflare/components/gpowers/commands/PowerUp.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,11 +14,7 @@ public class PowerUp extends PlayerCommand { } @Override - public boolean OnCommand(CommandSender sender, String label, String[] args) { - if (!(sender instanceof Player)) - sender.sendMessage("You must be a player to use this command! Contact a dev/ali if you think this is wrong"); - - Player player = (Player) sender; + public boolean OnCommand(Player player, String label, String[] args) { gPowerMemory.PowerUpPlayer(player); return true; } diff --git a/src/alisolarflare/components/minigames/commands/SetColourSpawn.java b/src/alisolarflare/components/minigames/commands/SetColourSpawn.java index 5582fec..0a46cf3 100644 --- a/src/alisolarflare/components/minigames/commands/SetColourSpawn.java +++ b/src/alisolarflare/components/minigames/commands/SetColourSpawn.java @@ -1,6 +1,5 @@ package alisolarflare.components.minigames.commands; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import alisolarflare.components.ModCommand; @@ -13,11 +12,9 @@ public class SetColourSpawn extends ModCommand{ this.spawnSet = spawnSet; } @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 == 0){ - sender.sendMessage("ERROR: Arguments required."); + player.sendMessage("ERROR: Arguments required."); return false; } @@ -26,34 +23,34 @@ public class SetColourSpawn extends ModCommand{ input.toLowerCase(); switch(input){ case ("r"): - sender.sendMessage("Setting Red Spawn..."); + player.sendMessage("Setting Red Spawn..."); spawnSet.setRSpawn(player.getLocation()); - sender.sendMessage("Red Spawn Set!"); + player.sendMessage("Red Spawn Set!"); break; case ("o"): - sender.sendMessage("Setting Orange Spawn..."); + player.sendMessage("Setting Orange Spawn..."); spawnSet.setRSpawn(player.getLocation()); - sender.sendMessage("Orange Spawn Set!"); + player.sendMessage("Orange Spawn Set!"); break; case ("y"): - sender.sendMessage("Setting Yellow Spawn..."); + player.sendMessage("Setting Yellow Spawn..."); spawnSet.setRSpawn(player.getLocation()); - sender.sendMessage("Yellow Spawn Set!"); + player.sendMessage("Yellow Spawn Set!"); break; case ("g"): - sender.sendMessage("Setting Green Spawn..."); + player.sendMessage("Setting Green Spawn..."); spawnSet.setRSpawn(player.getLocation()); - sender.sendMessage("Green Spawn Set!"); + player.sendMessage("Green Spawn Set!"); break; case ("b"): - sender.sendMessage("Setting Blue Spawn..."); + player.sendMessage("Setting Blue Spawn..."); spawnSet.setRSpawn(player.getLocation()); - sender.sendMessage("Blue Spawn Set!"); + player.sendMessage("Blue Spawn Set!"); break; case ("p"): - sender.sendMessage("Setting Purple Spawn..."); + player.sendMessage("Setting Purple Spawn..."); spawnSet.setRSpawn(player.getLocation()); - sender.sendMessage("Purple Spawn Set!"); + player.sendMessage("Purple Spawn Set!"); break; } return true; diff --git a/src/graveyard/autouhc/UHCModule.java b/src/graveyard/autouhc/UHCModule.java index 861a834..b33ce22 100644 --- a/src/graveyard/autouhc/UHCModule.java +++ b/src/graveyard/autouhc/UHCModule.java @@ -1,30 +1,30 @@ -package graveyard.autouhc; -import org.bukkit.plugin.java.JavaPlugin; - -import alisolarflare.components.Component; -import graveyard.autouhc.memory.MatchState; -import graveyard.autouhc.memory.UHCMatch; - -/**@deprecated*/ -public class UHCModule extends Component { - 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)); - - } -} +//package graveyard.autouhc; +//import org.bukkit.plugin.java.JavaPlugin; +// +//import alisolarflare.components.Component; +//import graveyard.autouhc.memory.MatchState; +//import graveyard.autouhc.memory.UHCMatch; +// +///**@deprecated*/ +//public class UHCModule extends Component { +// 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/graveyard/autouhc/controller/SetMatchState.java b/src/graveyard/autouhc/controller/SetMatchState.java index bced5be..0f858f8 100644 --- a/src/graveyard/autouhc/controller/SetMatchState.java +++ b/src/graveyard/autouhc/controller/SetMatchState.java @@ -1,71 +1,71 @@ -package graveyard.autouhc.controller; - -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import alisolarflare.components.ModCommand; -import graveyard.autouhc.memory.MatchState; -import graveyard.autouhc.memory.UHCMatch; -/**@deprecated*/ -public class SetMatchState extends ModCommand{ - - UHCMatch match; - public SetMatchState(UHCMatch match) { - this.match = match; - } - - @Override - public boolean OnCommand(CommandSender sender, String alias, String[] args) { - if (!(sender instanceof Player)){ - sender.sendMessage("You must be a player to use this command!"); - return false; - } - - Player player = (Player) sender; - - if (player.getName().equalsIgnoreCase("alisolarflare") && player.getName().equalsIgnoreCase("Arsen_Derby_FTW")){ - sender.sendMessage("You must be either Ali or Arsen to use this command!"); - return false; - } - - - if(args.length < 1 ){ - player.sendMessage("Usage: /setMatchState [stateToBeSet]"); - player.sendMessage("States: IDLE, WAITING, SETUP, INTRO, PEACE, POWER, TENSION, END"); - return false; - } - - String inputState = args[0]; - boolean inputIsValidState = false; - for (MatchState defaultMatchState : MatchState.values()){ - if(inputState.equalsIgnoreCase(defaultMatchState.toString())){ - inputIsValidState = true; - } - } - - if (inputIsValidState){ - match.setMatchState(MatchState.valueOf(inputState)); - player.sendMessage("Match State set to: " + match.getMatchState().toString() + "!"); - }else{ - player.sendMessage("Error, could not parse state."); - player.sendMessage("Valid States: IDLE, WAITING, SETUP, INTRO, PEACE, POWER, TENSION, END"); - return false; - } - - - return false; - } - - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return true; - } - - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - -} +//package graveyard.autouhc.controller; +// +//import org.bukkit.command.CommandSender; +//import org.bukkit.entity.Player; +// +//import alisolarflare.components.ModCommand; +//import graveyard.autouhc.memory.MatchState; +//import graveyard.autouhc.memory.UHCMatch; +///**@deprecated*/ +//public class SetMatchState extends ModCommand{ +// +// UHCMatch match; +// public SetMatchState(UHCMatch match) { +// this.match = match; +// } +// +// @Override +// public boolean OnCommand(CommandSender sender, String alias, String[] args) { +// if (!(sender instanceof Player)){ +// sender.sendMessage("You must be a player to use this command!"); +// return false; +// } +// +// Player player = (Player) sender; +// +// if (player.getName().equalsIgnoreCase("alisolarflare") && player.getName().equalsIgnoreCase("Arsen_Derby_FTW")){ +// sender.sendMessage("You must be either Ali or Arsen to use this command!"); +// return false; +// } +// +// +// if(args.length < 1 ){ +// player.sendMessage("Usage: /setMatchState [stateToBeSet]"); +// player.sendMessage("States: IDLE, WAITING, SETUP, INTRO, PEACE, POWER, TENSION, END"); +// return false; +// } +// +// String inputState = args[0]; +// boolean inputIsValidState = false; +// for (MatchState defaultMatchState : MatchState.values()){ +// if(inputState.equalsIgnoreCase(defaultMatchState.toString())){ +// inputIsValidState = true; +// } +// } +// +// if (inputIsValidState){ +// match.setMatchState(MatchState.valueOf(inputState)); +// player.sendMessage("Match State set to: " + match.getMatchState().toString() + "!"); +// }else{ +// player.sendMessage("Error, could not parse state."); +// player.sendMessage("Valid States: IDLE, WAITING, SETUP, INTRO, PEACE, POWER, TENSION, END"); +// return false; +// } +// +// +// return false; +// } +// +// @Override +// public boolean GetPlayerOnly() { +// // TODO Auto-generated method stub +// return true; +// } +// +// @Override +// public boolean GetModOnly() { +// // TODO Auto-generated method stub +// return false; +// } +// +//} diff --git a/src/graveyard/autouhc/intro/ScheduleMatch.java b/src/graveyard/autouhc/intro/ScheduleMatch.java index 670826e..b887e1c 100644 --- a/src/graveyard/autouhc/intro/ScheduleMatch.java +++ b/src/graveyard/autouhc/intro/ScheduleMatch.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 ScheduleMatch extends ModCommand{ - - public ScheduleMatch(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 ScheduleMatch extends ModCommand{ +// +// public ScheduleMatch(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/StartMatch.java b/src/graveyard/autouhc/intro/StartMatch.java index dfc4f54..5ba3fae 100644 --- a/src/graveyard/autouhc/intro/StartMatch.java +++ b/src/graveyard/autouhc/intro/StartMatch.java @@ -1,52 +1,52 @@ -package graveyard.autouhc.intro; - -import org.bukkit.command.CommandSender; - -import alisolarflare.components.ModCommand; -import graveyard.autouhc.memory.MatchState; -import graveyard.autouhc.memory.UHCMatch; - -/**@deprecated*/ -public class StartMatch extends ModCommand { - private UHCMatch match; - /**@deprecated*/ - 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 GetCommandPath() { - return "startmatch"; - } -} +//package graveyard.autouhc.intro; +// +//import org.bukkit.command.CommandSender; +// +//import alisolarflare.components.ModCommand; +//import graveyard.autouhc.memory.MatchState; +//import graveyard.autouhc.memory.UHCMatch; +// +///**@deprecated*/ +//public class StartMatch extends ModCommand { +// private UHCMatch match; +// /**@deprecated*/ +// 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 GetCommandPath() { +// return "startmatch"; +// } +//} diff --git a/src/graveyard/autouhc/memory/UHCMatch.java b/src/graveyard/autouhc/memory/UHCMatch.java index 3bbf260..bf43e13 100644 --- a/src/graveyard/autouhc/memory/UHCMatch.java +++ b/src/graveyard/autouhc/memory/UHCMatch.java @@ -1,51 +1,51 @@ -package graveyard.autouhc.memory; - -import java.util.ArrayList; -import java.util.List; - -import org.bukkit.Location; -import org.bukkit.configuration.file.FileConfiguration; - -/**@deprecated*/ -public class UHCMatch { - private FileConfiguration config; - private MatchState matchState = MatchState.IDLE; - private List playerList = new ArrayList(); - - private Location lobbyLocation; - public UHCMatch(FileConfiguration fileConfiguration, MatchState state) { - this.config = fileConfiguration; - this.matchState = state; - } - - public MatchState getMatchState(){ - return matchState; - } - - public void setMatchState(MatchState newMS){ - matchState = newMS; - config.set("UHCMatchState", newMS.toString()); - switch(newMS){ - default: - break; - } - } - - public List getPlayerList() { - return playerList; - } - - public void setPlayerList(List playerList) { - this.playerList = playerList; - } - - public Location getLobbyLocation() { - - return lobbyLocation; - } - - public void setLobbyLocation(Location lobbyLocation) { - this.lobbyLocation = lobbyLocation; - } - -} +//package graveyard.autouhc.memory; +// +//import java.util.ArrayList; +//import java.util.List; +// +//import org.bukkit.Location; +//import org.bukkit.configuration.file.FileConfiguration; +// +///**@deprecated*/ +//public class UHCMatch { +// private FileConfiguration config; +// private MatchState matchState = MatchState.IDLE; +// private List playerList = new ArrayList(); +// +// private Location lobbyLocation; +// public UHCMatch(FileConfiguration fileConfiguration, MatchState state) { +// this.config = fileConfiguration; +// this.matchState = state; +// } +// +// public MatchState getMatchState(){ +// return matchState; +// } +// +// public void setMatchState(MatchState newMS){ +// matchState = newMS; +// config.set("UHCMatchState", newMS.toString()); +// switch(newMS){ +// default: +// break; +// } +// } +// +// public List getPlayerList() { +// return playerList; +// } +// +// public void setPlayerList(List playerList) { +// this.playerList = playerList; +// } +// +// public Location getLobbyLocation() { +// +// return lobbyLocation; +// } +// +// public void setLobbyLocation(Location lobbyLocation) { +// this.lobbyLocation = lobbyLocation; +// } +// +//}