From 75bc2738b92e620c2292dda7927d2640fa3e9e30 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 24 Mar 2013 16:32:54 +1100 Subject: [PATCH] Check length before checking if command. --- api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java b/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java index a0c327f3..e8654a60 100644 --- a/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java +++ b/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java @@ -38,6 +38,6 @@ public class ChatEvent extends TargetedEvent implements Cancellable */ public boolean isCommand() { - return message.charAt( 0 ) == '/'; + return message.length() > 0 && message.charAt( 0 ) == '/'; } }