Skip to content

Commit

Permalink
Just some code formatting cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
fernferret committed Jul 23, 2011
1 parent a2fc990 commit dbf1fbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/com/pneumaticraft/commandhandler/CommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ public CommandHandler(JavaPlugin plugin, PermissionsInterface permissions) {
this.queuedCommands = new ArrayList<QueuedCommand>();
this.permissions = permissions;
}

public List<Command> getCommands(CommandSender sender) {
List<Command> permissiveCommands = new ArrayList<Command>();
for(Command c : this.allCommands) {
if(this.permissions.hasPermission(sender, c.getPermissionString(), c.isOpRequired())) {
for (Command c : this.allCommands) {
if (this.permissions.hasPermission(sender, c.getPermissionString(), c.isOpRequired())) {
permissiveCommands.add(c);
}
}
return permissiveCommands;
}

public List<Command> getAllCommands() {
return this.allCommands;
}
Expand All @@ -54,7 +54,7 @@ public boolean locateAndRunCommand(CommandSender sender, List<String> args) {
foundCommand.removeKeyArgs(parsedArgs, key);
// Special case:
// If the ONLY param is a '?' show them the usage.
if(parsedArgs.size() == 1 && parsedArgs.get(0).equals("?")) {
if (parsedArgs.size() == 1 && parsedArgs.get(0).equals("?")) {
this.showHelp(sender, foundCommand);
} else {
checkAndRunCommand(sender, parsedArgs, foundCommand);
Expand Down
16 changes: 8 additions & 8 deletions src/com/pneumaticraft/commandhandler/QueuedCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
import org.bukkit.plugin.java.JavaPlugin;

public class QueuedCommand {
private String name;
private String name;
private List<String> args;
private Class<?> paramTypes[];
private CommandSender sender;
private JavaPlugin plugin;
private Calendar timeRequested;
private String success;
private String fail;

public QueuedCommand(String commandName, List<String> args, Class<?> partypes[], CommandSender sender, Calendar instance, JavaPlugin plugin, String success, String fail) {
this.plugin = plugin;
this.name = commandName;
Expand All @@ -27,11 +27,11 @@ public QueuedCommand(String commandName, List<String> args, Class<?> partypes[],
this.setSuccess(success);
this.setFail(fail);
}

public CommandSender getSender() {
return this.sender;
}

public boolean execute() {
this.timeRequested.add(Calendar.SECOND, 10);
if (this.timeRequested.after(Calendar.getInstance())) {
Expand All @@ -48,19 +48,19 @@ public boolean execute() {
}
return false;
}

private void setSuccess(String success) {
this.success = success;
}

public String getSuccess() {
return this.success;
}

private void setFail(String fail) {
this.fail = fail;
}

public String getFail() {
return this.fail;
}
Expand Down

0 comments on commit dbf1fbf

Please sign in to comment.