Worked on the IDLE phase of UHC
This commit is contained in:
parent
21fcc3fb65
commit
64080eaf42
6 changed files with 253 additions and 212 deletions
|
@ -3,10 +3,11 @@ package alisolarflare.uhc;
|
|||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import alisolarflare.Module;
|
||||
import alisolarflare.uhc.commands.AddToUHC;
|
||||
import alisolarflare.uhc.commands.ConfigureMatch;
|
||||
import alisolarflare.uhc.commands.ScheduleMatch;
|
||||
import alisolarflare.uhc.commands.StartMatch;
|
||||
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;
|
||||
|
||||
|
@ -23,6 +24,7 @@ public class UHCModule extends Module {
|
|||
}
|
||||
|
||||
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,4 +1,4 @@
|
|||
package alisolarflare.uhc.commands;
|
||||
package alisolarflare.uhc.idle;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -22,8 +22,8 @@ public class AddToUHC extends TBMCCommandBase {
|
|||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||
// INPUT SANITATION
|
||||
Player player = (Player) sender;
|
||||
if (player.getName() != "alisolarflare") {
|
||||
sender.sendMessage("You must be Ali to use this command, send her a message to change the permissions");
|
||||
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) {
|
39
src/alisolarflare/uhc/idle/JoinUHC.java
Normal file
39
src/alisolarflare/uhc/idle/JoinUHC.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package alisolarflare.uhc.commands;
|
||||
package alisolarflare.uhc.intro;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package alisolarflare.uhc.commands;
|
||||
package alisolarflare.uhc.intro;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package alisolarflare.uhc.commands;
|
||||
package alisolarflare.uhc.intro;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
Loading…
Reference in a new issue