mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 05:05:18 +01:00
Remove slash from front of perform command
https://github.com/BentoBoxWorld/BentoBox/issues/1369
This commit is contained in:
parent
502aaa87a4
commit
7b28c67db0
@ -107,7 +107,7 @@ public abstract class DefaultPlayerCommand extends CompositeCommand
|
|||||||
String command = this.<GameModeAddon>getAddon().getWorldSettings().getDefaultPlayerAction();
|
String command = this.<GameModeAddon>getAddon().getWorldSettings().getDefaultPlayerAction();
|
||||||
|
|
||||||
// Perform command or use "go" command.
|
// Perform command or use "go" command.
|
||||||
if (command != null && user.performCommand("/" + label + " " + command))
|
if (command != null && user.performCommand(label + " " + command))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ public abstract class DefaultPlayerCommand extends CompositeCommand
|
|||||||
String command = this.<GameModeAddon>getAddon().getWorldSettings().getDefaultNewPlayerAction();
|
String command = this.<GameModeAddon>getAddon().getWorldSettings().getDefaultNewPlayerAction();
|
||||||
|
|
||||||
// Perform command or use "create" command.
|
// Perform command or use "create" command.
|
||||||
if (command != null && user.performCommand("/" + label + " " + command))
|
if (command != null && user.performCommand(label + " " + command))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -535,7 +535,7 @@ public class User {
|
|||||||
public boolean performCommand(String command) {
|
public boolean performCommand(String command) {
|
||||||
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(getPlayer(), command);
|
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(getPlayer(), command);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
// only perform the command, if the event wasn't cancelled by an other plugin:
|
// only perform the command, if the event wasn't cancelled by an other plugin:
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
return getPlayer().performCommand(event.getMessage());
|
return getPlayer().performCommand(event.getMessage());
|
||||||
|
Loading…
Reference in New Issue
Block a user