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
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
@NotNull String[] strings) {
@NotNull String[] args) {
if (commandSender instanceof Player) {
Player player = (Player) commandSender;
if (!player.hasPermission("stargate.reload")) {

View File

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