registerCommand can be private as it isn't used outside of the class

Reverted the last commit
This commit is contained in:
Venal 2018-02-21 20:43:32 -05:00
parent 6fc6298b57
commit b24462e55c
2 changed files with 3 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class MuteCommand extends Command {
MessageFactory.create("Could not find member!").setColor(member.getColor()).queue(channel);
return;
}
Member targetMember = (Member) objArray[0];
Member targetMember = (Member) objArray[1];
String targetMemberName = String.valueOf(objArray[0]);
if (targetMember == null) {
MessageFactory.create("Could not find member!").setColor(member.getColor()).queue(channel);

View File

@ -10,7 +10,8 @@ public class CommandHandler {
private Map<String, Command> commandMap = new HashMap<>();
public void registerCommand(Command command) {
private void registerCommand(Command command) {
if (commandMap.containsKey(command.getCommand())) return;
commandMap.put(command.getCommand(), command);
}