mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-21 04:49:51 +08:00
Change /reload WorldEdit to /reloadwe.
This commit is contained in:
parent
b925855d77
commit
9f25c1906d
@ -60,21 +60,18 @@ public void onPlayerQuit(PlayerEvent event) {
|
|||||||
public void onPlayerCommand(PlayerChatEvent event) {
|
public void onPlayerCommand(PlayerChatEvent event) {
|
||||||
String[] split = event.getMessage().split(" ");
|
String[] split = event.getMessage().split(" ");
|
||||||
|
|
||||||
if (split[0].equalsIgnoreCase("/reload")
|
if (split[0].equalsIgnoreCase("/reloadwe")
|
||||||
&& plugin.hasPermission(event.getPlayer(), "/reload")
|
&& plugin.hasPermission(event.getPlayer(), "/reloadwe")) {
|
||||||
&& split.length > 1) {
|
try {
|
||||||
if (split[1].equalsIgnoreCase("WorldEdit")) {
|
plugin.loadConfiguration();
|
||||||
try {
|
event.getPlayer().sendMessage("WorldEdit configuration reloaded.");
|
||||||
plugin.loadConfiguration();
|
} catch (Throwable t) {
|
||||||
event.getPlayer().sendMessage("WorldEdit configuration reloaded.");
|
event.getPlayer().sendMessage("Error while reloading: "
|
||||||
} catch (Throwable t) {
|
+ t.getMessage());
|
||||||
event.getPlayer().sendMessage("Error while reloading: "
|
|
||||||
+ t.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
event.setCancelled(true);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.controller.handleCommand(wrapPlayer(event.getPlayer()), split)) {
|
if (plugin.controller.handleCommand(wrapPlayer(event.getPlayer()), split)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user