mojira.dev

Conor Byrne

Assigned

No issues.

Reported

No issues.

Comments

I've taken a look at the code, and the fix seems to be quite simple.

In a normal command block, a check is done to see if the string is empty beforehand (yarn mappings):

ServerPlayNetworkHandler#onUpdateCommandBlock

commandBlockExecutor.markDirty();
if (!ChatUtil.isEmpty(string)) {
   this.player.sendSystemMessage(new TranslatableText("advMode.setCommand.success", new Object[]{string}), Util.NIL_UUID);
}

But, in a minecart command block, the implementation is different (yarn mappings):

ServerPlayNetworkHandler#onUpdateCommandBlockMinecart

commandBlockExecutor.markDirty();
this.player.sendSystemMessage(new TranslatableText("advMode.setCommand.success", new Object[]{packet.getCommand()}), Util.NIL_UUID);

This issue can easily be solved by only calling sendSystemMessage if ChatUtil#isEmpty returns false like a normal command block