From 9fefdf3313ddedf4b79df246cce95910bb1b5c02 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Tue, 21 Jul 2015 14:27:13 +1000 Subject: [PATCH] Fixes #434 --- .../intellectualcrafters/plot/listeners/PlayerEvents.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index 734658ebf..5d984e692 100644 --- a/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -293,7 +293,10 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi @EventHandler 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(" "); PluginCommand cmd = Bukkit.getServer().getPluginCommand(split[0]); if (cmd == null) {