diff --git a/src/main/java/net/programmer/igoodie/twitchspawn/tslanguage/action/ExecuteAction.java b/src/main/java/net/programmer/igoodie/twitchspawn/tslanguage/action/ExecuteAction.java index 34f02cc..9eb1655 100644 --- a/src/main/java/net/programmer/igoodie/twitchspawn/tslanguage/action/ExecuteAction.java +++ b/src/main/java/net/programmer/igoodie/twitchspawn/tslanguage/action/ExecuteAction.java @@ -33,12 +33,16 @@ protected void performAction(ServerPlayerEntity player, EventArguments args) { .withPermissionLevel(9999) // OVER 9000! .withFeedbackDisabled(); - commands.forEach(command -> { - int result = player.getServer() - .getCommandManager() - .handleCommand(source, replaceExpressions(command, args)); - TwitchSpawn.LOGGER.info("Executed (Status:{}) -> {}", result, command); - }); + + for (String command : commands) { + TwitchSpawn.SERVER.execute(() -> { + int result = TwitchSpawn.SERVER + .getCommandManager() + .handleCommand(source, replaceExpressions(command, args)); + + TwitchSpawn.LOGGER.info("Executed (Status:{}) -> {}", result, replaceExpressions(command, args)); + }); + } } } diff --git a/src/main/resources/assets/twitchspawn/default/subtitles.default.json b/src/main/resources/assets/twitchspawn/default/subtitles.default.json index 177c780..68b02eb 100644 --- a/src/main/resources/assets/twitchspawn/default/subtitles.default.json +++ b/src/main/resources/assets/twitchspawn/default/subtitles.default.json @@ -67,6 +67,26 @@ "color": "white" } ], + "SHUFFLE": [ + { + "text": "${actor}", + "color": "aqua" + }, + { + "text": " shuffled stuff around!", + "color": "white" + } + ], + "CHANGE": [ + { + "text": "${actor}", + "color": "aqua" + }, + { + "text": " changed some inventory stuff!", + "color": "white" + } + ], "OS_RUN": [ { "text": "${actor}", diff --git a/src/test/resources/comment_expected.tsl b/src/test/resources/comment_expected.tsl index 7d67a13..964bb6c 100644 --- a/src/test/resources/comment_expected.tsl +++ b/src/test/resources/comment_expected.tsl @@ -1 +1 @@ -BOTH DROP stick 1 AND DROP %diamond{display:{Name:"\"# Not a \\ comment\""}}% 1 AND DROP %diamond{display:{Name:"\"#Not a \% comment\""}}% 1 AND SEED foo\* ON Twitch Follow +BOTH DROP stick 1 AND DROP %diamond{display:{Name:"\"# Not a \\ comment\""}}% 1 AND DROP %diamond{display:{Name:"\"#Not a \% comment\""}}% 1 AND SEED foo ON Twitch Follow diff --git a/src/test/resources/comment_test.tsl b/src/test/resources/comment_test.tsl index 0ced6fa..01e42d0 100644 --- a/src/test/resources/comment_test.tsl +++ b/src/test/resources/comment_test.tsl @@ -8,7 +8,7 @@ BOTH # Comment with % AND DROP %diamond{display:{Name:"\"#Not a \% comment\""}}% 1 AND - SEED foo\*#% + SEED foo#% ON Twitch Follow # Comment starting with whitespace