mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
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>
|
||||
Date: Fri, 18 Mar 2016 03:28:07 -0400
|
||||
Subject: [PATCH] Add command to reload permissions.yml and require confirm to
|
||||
|
@ -35,10 +35,10 @@ index 309fa3f..b527372 100644
|
|||
+ 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
|
||||
index c70d512..ee29ebb 100644
|
||||
index c70d512..040509c 100644
|
||||
--- a/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) {
|
||||
super(name);
|
||||
this.description = "Reloads the server configuration and plugins";
|
||||
|
@ -62,6 +62,9 @@ index c70d512..ee29ebb 100644
|
|||
+ return true;
|
||||
+ } else if ("confirm".equalsIgnoreCase(args[0])) {
|
||||
+ confirmed = true;
|
||||
+ } else {
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "Usage: " + usageMessage);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ 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 + "If you encounter any issues please use the /stop command to restart your server.");
|
||||
Bukkit.reload();
|
||||
@@ -32,7 +50,8 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@@ -32,7 +53,8 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@Override
|
||||
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