mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 20:55:41 +01:00
Allow Non-Bentobox commands as default player (commands) (#1760)
* Update ServerCompatibility.java * Update Default Player Command to support non-bentobox commands
This commit is contained in:
parent
64c83f809c
commit
ca39e05fc7
@ -117,7 +117,12 @@ public abstract class DefaultPlayerCommand extends CompositeCommand {
|
|||||||
orElse(false);
|
orElse(false);
|
||||||
} else {
|
} else {
|
||||||
// Command is not a known sub command - try to perform it directly - some plugins trap these commands, like Deluxe menus
|
// Command is not a known sub command - try to perform it directly - some plugins trap these commands, like Deluxe menus
|
||||||
return user.performCommand(label + " " + command);
|
if (command.startsWith("/")) {
|
||||||
|
// If commands starts with Slash, don't append the prefix
|
||||||
|
return user.performCommand(command.substring(1));
|
||||||
|
} else {
|
||||||
|
return user.performCommand(label + " " + command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user