Check length before checking if command.
This commit is contained in:
parent
cf4846baa9
commit
75bc2738b9
@ -38,6 +38,6 @@ public class ChatEvent extends TargetedEvent implements Cancellable
|
|||||||
*/
|
*/
|
||||||
public boolean isCommand()
|
public boolean isCommand()
|
||||||
{
|
{
|
||||||
return message.charAt( 0 ) == '/';
|
return message.length() > 0 && message.charAt( 0 ) == '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user