Skip to content

Commit 57ae178

Browse files
committed
fix execute as run mp
1 parent a02fee9 commit 57ae178

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ mod_name=MadParticle
3535
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3636
mod_license=GNU GPL 3.0
3737
# The mod version. See https://semver.org/
38-
mod_version=26.1.2-11
38+
mod_version=26.1.2-12
3939
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
4040
# This should match the base package used for the mod sources.
4141
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/cn/ussshenzhou/madparticle/command/MadParticleCommand.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,11 @@ public static void fastSend(String commandString, CommandSourceStack sourceStack
258258
CommandContext<CommandSourceStack> ctPre = parseResults.getContext().build(commandString);
259259
Collection<ServerPlayer> playerList;
260260
try {
261-
playerList = ctPre.getArgument("whoCanSee", EntitySelector.class).findPlayers(ctPre.getSource());
261+
var ct = CommandHelper.getContextHasArgument(ctPre, "whoCanSee", EntitySelector.class);
262+
if (ct == null) {
263+
return;
264+
}
265+
playerList = ct.getArgument("whoCanSee", EntitySelector.class).findPlayers(ctPre.getSource());
262266
} catch (CommandSyntaxException e) {
263267
return;
264268
}

0 commit comments

Comments
 (0)