Skip to content

Commit fe04cee

Browse files
committed
feat: Add multi-command (#7)
1 parent 2b0c86e commit fe04cee

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/java/cn/msdnicrosoft/commandbuttons/CommandButtons.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ public class CommandButtons implements ModInitializer {
2626
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
2727

2828
public static void send(String text) {
29-
if (text.startsWith("/")) {
30-
send(text.substring(1), true);
31-
} else {
32-
send(text, false);
29+
for (String i : text.split(" && ")) {
30+
if (i.startsWith("/")) {
31+
send(i.substring(1), true);
32+
} else {
33+
send(i, false);
34+
}
3335
}
3436
}
3537

0 commit comments

Comments
 (0)