Fix enchant command feedback messages #22
No reviewers
Labels
No labels
documentation
good first issue
help wanted
resolution: duplicate
resolution: invalid
resolution: won't fix
status: needs triage
type: bug
type: feature
type: performance
type: question
version: 1.19.4
version: 1.20
version: 1.20.1
version: 1.20.2
version: 1.20.4
version: 1.20.6
version: 1.21.11
version: 1.21.4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Minecraft/Folia!22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/enchant-cmd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes https://github.com/PaperMC/Folia/issues/12
This issue probably exists in other places where "feedback messages" are sent in commands, but I just wanted to see if this was an acceptable solution to the issue.
Amaranth also suggested you could keep some atomic int counters that incremented/decremented appropriately so in the last of the scheduled entity tasks, the messages could be sent there so that's an alternative solution.
tsk
This isn't acceptable due to the usage of completablefutures. The exception handling is broken, as you've swallowed every other exception that isn't CommandSyntaxException. The proper handling is to re-throw those exceptions up the stack, but that isn't possible with completablefutures.
Ok, I removed the use of completable futures and moved over to sending the message when the last of the targets is processed, either inside the scheduled task or not (if its an invalid entity).