Renames strings in onCommand to args for consistency

This commit is contained in:
Kristian Knarvik 2021-09-20 13:46:20 +02:00
parent 8ff30ed03f
commit f12306426b
2 changed files with 7 additions and 7 deletions

View File

@ -25,7 +25,7 @@ public class CommandReload implements CommandExecutor {
@Override @Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
@NotNull String[] strings) { @NotNull String[] args) {
if (commandSender instanceof Player) { if (commandSender instanceof Player) {
Player player = (Player) commandSender; Player player = (Player) commandSender;
if (!player.hasPermission("stargate.reload")) { if (!player.hasPermission("stargate.reload")) {

View File

@ -28,12 +28,12 @@ public class CommandStarGate implements CommandExecutor {
@Override @Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
@NotNull String[] strings) { @NotNull String[] args) {
if (strings.length > 0) { if (args.length > 0) {
if (strings[0].equalsIgnoreCase("about")) { if (args[0].equalsIgnoreCase("about")) {
return new CommandAbout().onCommand(commandSender, command, s, strings); return new CommandAbout().onCommand(commandSender, command, s, args);
} else if (strings[0].equalsIgnoreCase("reload")) { } else if (args[0].equalsIgnoreCase("reload")) {
return new CommandReload(plugin).onCommand(commandSender, command, s, strings); return new CommandReload(plugin).onCommand(commandSender, command, s, args);
} }
return false; return false;
} else { } else {