Fix the tests failing and also fix the jail command not doing anything.

This commit is contained in:
graywolf336
2014-02-11 20:44:19 -06:00
parent 58bc007b3e
commit 48a7435fbe
5 changed files with 36 additions and 7 deletions

View File

@ -118,7 +118,7 @@ public class JailMain extends JavaPlugin {
*/
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
if(command.getName().equalsIgnoreCase("jail")) {
jh.handleCommand(jm, sender, args);
jh.parseCommand(jm, sender, args);
}else {
cmdHand.handleCommand(jm, sender, command.getName().toLowerCase(), args);
}

View File

@ -37,10 +37,6 @@ public class JailHandler {
plugin.getLogger().info("Loaded " + commands.size() + " sub-commands of /jail.");
}
public void handleCommand(JailManager jm, CommandSender sender, String... args) {
}
/**
* Handles the given command and checks that the command is in valid form.

View File

@ -19,9 +19,14 @@ public interface Jailing {
public String getCell();
@Option(longName={"muted", "canttalk"}, shortName="m", description = "whether the prisoner is muted or not")
public boolean isMuted();
public boolean getMuted();
@Option(longName={"reason"}, shortName="r", description = "the reason this player is being jailed")
public List<String> getReason();
public boolean isTime();
public boolean isJail();
public boolean isCell();
public boolean isMuted();
public boolean isReason();
}

View File

@ -150,7 +150,7 @@ public class JailCommand implements Command {
}
//If the config has automatic muting, then let's set them as muted
boolean muted = params.isMuted();
boolean muted = params.getMuted();
if(jm.getPlugin().getConfig().getBoolean(Settings.AUTOMATICMUTE.getPath())) {
muted = true;
}