mirror of
https://github.com/jie65535/gc-opencommand-plugin.git
synced 2025-06-02 17:49:12 +08:00
Fix empty command
This commit is contained in:
parent
6279ed2982
commit
f8a4e6f205
@ -159,6 +159,8 @@ public final class OpenCommandHandler implements Router {
|
|||||||
try {
|
try {
|
||||||
handler.setLength(0);
|
handler.setLength(0);
|
||||||
for (var command : rawMessage.split("\n[/!]|\\|")) {
|
for (var command : rawMessage.split("\n[/!]|\\|")) {
|
||||||
|
command = command.trim();
|
||||||
|
if (command.isEmpty()) continue;
|
||||||
if (command.charAt(0) == '/' || command.charAt(0) == '!') {
|
if (command.charAt(0) == '/' || command.charAt(0) == '!') {
|
||||||
command = command.substring(1);
|
command = command.substring(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user