This patch changes sign command logic so that `run_command` click events are routed through the standard chat/command
logic used for inbound chat messages.
This fixes numerous issues related to sign click commands:
- Signs with a `run_command` value of "/<plugin command>" would fail and show the "Unknown command" warning. This
prevents usage of commands like `//wand` from WorldEdit in sign click events entirely and requires users to drop
the leading slash from other plugins' commands. This patch now executes the plugin commands as would be expected,
adding a leading slash if necessary.
- Signs with a `run_command` value that doesn't match an existing command could fail silently. This patch causes
these to *always* show "Unknown command" instead.
- Plugins listening to `PlayerCommandPreprocessEvent` would not be able to intercept any command executions from
sign click events. This patch allows plugins to intercept player commands when fired by a click event, in the same
manner as commands executed by the player typing or clicking on a chat message.
- Commands executed from signs would not be logged to the console. This patch fixes this.
This patch also prepends a leading slash if the `run_command` value lacks one, which matches vanilla behaviour (old
code would strip this slash away) while also ensuring `PlayerCommandPreprocessEvent#getMessage` remains consistent
with other command executions from chat (which always include the leading slash).
This looks like mojang introduced an NPE however it was previously being
supressed by the future used by the server, we'll just stick to the legacy
behavior of retainining the existing profile of earlier versions
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
214b9f14 SPIGOT-6605: Add method to access value of enforce-whitelist
CraftBukkit Changes:
b121d3b9 SPIGOT-6605: Add method to access value of enforce-whitelist
The new task fixJarForReobf was added after shadowJar, but since
reobfJar's input is changed in this patch, that new task needs to be
referenced instead of shadowJar.
having spoken to mojang about this the general issue is data which shouldn't
have been saved in the first place, so if we lose this data it's not really
an issue, bar being annoying spammy. if the spam gets on your nerves, shamefully,
all you can really do is forceUpgrade to get the conversions of the way.
Dropping as this breaks other aspects of the server and bar being spammy
seems to have no other real negative outcomes
Upstream forgot to update the check here which prevents explosions
occuring under 0 height, however, vanilla already checks that we
are in bounds of the world above this, so this call is entirely
redundant.
* Make gradle take build number from env vars
* Add git information to manifest and version command/log
* trim
* Fix tests by adding NotNull annotations
* rebase
* Apply suggestions from kashike
Co-authored-by: Riley Park <riley.park@meino.net>
* Not always show branch
* Why can't everything be NotNull by default?
* Rebase
Co-authored-by: Riley Park <riley.park@meino.net>