Add usage message to ReloadCommand
Used when the wrong arguments are supplied, missed when we added the permissions reload functionality.
This commit is contained in:
parent
0860727dae
commit
ecefa79676
1 changed files with 8 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
From b9193c99b34c7ce136f4c8edee9672346e79617f Mon Sep 17 00:00:00 2001
|
From f0041900182f286ab91e23bd1c3dac326d165510 Mon Sep 17 00:00:00 2001
|
||||||
From: William <admin@domnian.com>
|
From: William <admin@domnian.com>
|
||||||
Date: Fri, 18 Mar 2016 03:28:07 -0400
|
Date: Fri, 18 Mar 2016 03:28:07 -0400
|
||||||
Subject: [PATCH] Add command to reload permissions.yml and require confirm to
|
Subject: [PATCH] Add command to reload permissions.yml and require confirm to
|
||||||
|
@ -35,10 +35,10 @@ index 309fa3f..b527372 100644
|
||||||
+ void reloadPermissions(); // Paper
|
+ void reloadPermissions(); // Paper
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||||
index c70d512..ee29ebb 100644
|
index c70d512..040509c 100644
|
||||||
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||||
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||||
@@ -11,15 +11,33 @@ public class ReloadCommand extends BukkitCommand {
|
@@ -11,15 +11,36 @@ public class ReloadCommand extends BukkitCommand {
|
||||||
public ReloadCommand(String name) {
|
public ReloadCommand(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
this.description = "Reloads the server configuration and plugins";
|
this.description = "Reloads the server configuration and plugins";
|
||||||
|
@ -62,6 +62,9 @@ index c70d512..ee29ebb 100644
|
||||||
+ return true;
|
+ return true;
|
||||||
+ } else if ("confirm".equalsIgnoreCase(args[0])) {
|
+ } else if ("confirm".equalsIgnoreCase(args[0])) {
|
||||||
+ confirmed = true;
|
+ confirmed = true;
|
||||||
|
+ } else {
|
||||||
|
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "Usage: " + usageMessage);
|
||||||
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ if (!confirmed) {
|
+ if (!confirmed) {
|
||||||
|
@ -73,7 +76,7 @@ index c70d512..ee29ebb 100644
|
||||||
Command.broadcastCommandMessage(sender, ChatColor.RED + "Please note that this command is not supported and may cause issues when using some plugins.");
|
Command.broadcastCommandMessage(sender, ChatColor.RED + "Please note that this command is not supported and may cause issues when using some plugins.");
|
||||||
Command.broadcastCommandMessage(sender, ChatColor.RED + "If you encounter any issues please use the /stop command to restart your server.");
|
Command.broadcastCommandMessage(sender, ChatColor.RED + "If you encounter any issues please use the /stop command to restart your server.");
|
||||||
Bukkit.reload();
|
Bukkit.reload();
|
||||||
@@ -32,7 +50,8 @@ public class ReloadCommand extends BukkitCommand {
|
@@ -32,7 +53,8 @@ public class ReloadCommand extends BukkitCommand {
|
||||||
@Override
|
@Override
|
||||||
public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException
|
public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException
|
||||||
{
|
{
|
||||||
|
@ -102,5 +105,5 @@ index 1302773..9ce0a5d 100644
|
||||||
+
|
+
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.9.2.windows.1
|
2.10.1.windows.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue