mojira.dev
MC-253333

the way /debug and /forceload works contradicts the brigadier

With the brigadier having been used since 1.13, the way to handle the fail of a command changed. To make a command failed, a "com.mojang.brigadier.exceptions.CommandSyntaxException" should be thrown in order to notify the brigadier.

However, in /debug, and /forceload, under some certain conditions, no expception is thrown when the command fails, instead, they merely send a red message to executor.

As a result, when executing in a command block or by an /execute command, they're considered to be successful even if they should be failed.

 

related to MC-136904

 

For example:

in a world that there's no force loaded chunk.

/scoreboard objectives add success dummy

/scoreboard objectives setdisplay sidebar success

/execute store success score @s success run forceload query

Although a red message is displayed, the score become 1.

Expected behavior:

it should be failed, and the score become 0

Comments 1

I cannot reproduce this as written

Former user

(Unassigned)

Unconfirmed

(Unassigned)

1.19, 22w24a, 23w04a, 23w05a

Retrieved