mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-12 03:59:22 +00:00
Fixes #434
This commit is contained in:
parent
9c5d6a979a
commit
9fefdf3313
1 changed files with 4 additions and 1 deletions
|
@ -293,7 +293,10 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void PlayerCommand(final PlayerCommandPreprocessEvent event) {
|
public void PlayerCommand(final PlayerCommandPreprocessEvent event) {
|
||||||
final String message = event.getMessage().toLowerCase().replaceAll("/", "");
|
final String message = event.getMessage().toLowerCase().replaceAll("/", "").trim();
|
||||||
|
if (message.length() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String[] split = message.split(" ");
|
String[] split = message.split(" ");
|
||||||
PluginCommand cmd = Bukkit.getServer().getPluginCommand(split[0]);
|
PluginCommand cmd = Bukkit.getServer().getPluginCommand(split[0]);
|
||||||
if (cmd == null) {
|
if (cmd == null) {
|
||||||
|
|
Loading…
Reference in a new issue