Fix issue #129 - make chat event fire for commands, and add isCommand method.

This commit is contained in:
md_5
2013-03-12 15:15:25 +11:00
parent fea3642550
commit 92c1450909
2 changed files with 16 additions and 8 deletions

View File

@@ -30,4 +30,14 @@ public class ChatEvent extends TargetedEvent implements Cancellable
super( sender, receiver );
this.message = message;
}
/**
* Checks whether this message is valid as a command
*
* @return if this message is a command
*/
public boolean isCommand()
{
return message.charAt( 0 ) == '/';
}
}