Worked on the IDLE phase of UHC

This commit is contained in:
alisolarflare 2016-11-05 13:46:13 -04:00
parent 21fcc3fb65
commit 64080eaf42
6 changed files with 253 additions and 212 deletions

View file

@ -3,10 +3,11 @@ package alisolarflare.uhc;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import alisolarflare.Module; import alisolarflare.Module;
import alisolarflare.uhc.commands.AddToUHC; import alisolarflare.uhc.idle.AddToUHC;
import alisolarflare.uhc.commands.ConfigureMatch; import alisolarflare.uhc.idle.JoinUHC;
import alisolarflare.uhc.commands.ScheduleMatch; import alisolarflare.uhc.intro.ConfigureMatch;
import alisolarflare.uhc.commands.StartMatch; import alisolarflare.uhc.intro.ScheduleMatch;
import alisolarflare.uhc.intro.StartMatch;
import alisolarflare.uhc.memory.MatchState; import alisolarflare.uhc.memory.MatchState;
import alisolarflare.uhc.memory.UHCMatch; import alisolarflare.uhc.memory.UHCMatch;
@ -23,6 +24,7 @@ public class UHCModule extends Module {
} }
registerCommand(plugin, new AddToUHC(match)); registerCommand(plugin, new AddToUHC(match));
registerCommand(plugin, new JoinUHC(match));
registerCommand(plugin, new StartMatch(match)); registerCommand(plugin, new StartMatch(match));
registerCommand(plugin, new ConfigureMatch(match)); registerCommand(plugin, new ConfigureMatch(match));
registerCommand(plugin, new ScheduleMatch(match)); registerCommand(plugin, new ScheduleMatch(match));

View file

@ -1,4 +1,4 @@
package alisolarflare.uhc.commands; package alisolarflare.uhc.idle;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -22,8 +22,8 @@ public class AddToUHC extends TBMCCommandBase {
public boolean OnCommand(CommandSender sender, String label, String[] args) { public boolean OnCommand(CommandSender sender, String label, String[] args) {
// INPUT SANITATION // INPUT SANITATION
Player player = (Player) sender; Player player = (Player) sender;
if (player.getName() != "alisolarflare") { if (!player.getName().equalsIgnoreCase("alisolarflare") && !player.getName().equalsIgnoreCase("Arsen_Derby_FTW")) {
sender.sendMessage("You must be Ali to use this command, send her a message to change the permissions"); sender.sendMessage("You must be Ali to add someone else to a UHC, send her a message to change the permissions");
return false; return false;
} }
if (args.length <= 1) { if (args.length <= 1) {

View file

@ -0,0 +1,39 @@
package alisolarflare.uhc.idle;
import org.bukkit.command.CommandSender;
import alisolarflare.uhc.memory.UHCMatch;
import buttondevteam.lib.chat.TBMCCommandBase;
public class JoinUHC extends TBMCCommandBase{
private UHCMatch match;
public JoinUHC(UHCMatch match) {
this.match = match;
}
@Override
public String[] GetHelpText(String alias) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
return false;
}
@Override
public boolean GetPlayerOnly() {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean GetModOnly() {
// TODO Auto-generated method stub
return false;
}
}

View file

@ -1,4 +1,4 @@
package alisolarflare.uhc.commands; package alisolarflare.uhc.intro;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;

View file

@ -1,4 +1,4 @@
package alisolarflare.uhc.commands; package alisolarflare.uhc.intro;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;

View file

@ -1,4 +1,4 @@
package alisolarflare.uhc.commands; package alisolarflare.uhc.intro;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;