Commit Graph

22 Commits

Author SHA1 Message Date
Bjarne Koll
142695eb00 Default minecraft alias to redirect (#12146)
While the running server will still be using the recently introduced
copy-mechanic for vanilla command namespacing, the data converter logic
relies on the fact that namespaced aliases were redirects as well.

To not break the converted, the commands type now takes a modern flag
only set by the running server.
2025-02-18 00:09:54 +01:00
Bjarne Koll
3b9106c7d1 Readd dead redirect recovery (#12136)
While the paper command system no longer uses redirects for namespaced
registration, vanilla still does. This means that removal of vanilla
redirecting target nodes still causes issues, e.g. the removal of the
vanilla 'msg' node in favour of a command alias one.
Redirecting nodes like tell, minecraft:msg and minecraft:tell are broken
by this and need to by flattened before sending them to the client.
2025-02-17 23:51:52 +01:00
Jake Potrebic
84609dc046 Don't auto-create any brig redirects (#11954) 2025-02-16 13:55:27 -08:00
Jake Potrebic
49f715fdda update brig in the API and patch cleanup 2024-12-18 18:30:29 -08:00
Lulu13022002
6126012369 readd beacon effect cause 2024-12-18 19:29:39 +01:00
Jake Potrebic
acd43900f5 remove more imports and cleanup 2024-12-15 12:51:34 -08:00
Nassim Jahnke
f73e864f18 Commands 2024-12-13 21:21:57 +01:00
Nassim Jahnke
45ddf764d9 Move patches to unapplied 2024-12-12 12:30:31 +01:00
Rick
ea24e2c6aa Fix incorrect command serialization by creating new Command
Fixes #11649 - As noted in the issue, when CommandNodes are serialized
they are used as the key in a Map. Their equals()/hashcode() should only
match if they are equal nodes (name & command), but due to the erasure of the command field pre-serialization, nodes with different commands can be mapped onto the same value. This causes the client to interpret both nodes as the same, causing suggestions where they should not.

This is fixed by creating a different no-op command for the
erasure, instead of them holding the same lambda.
2024-11-26 20:45:52 +01:00
Jason Penilla
164078cd2a Prioritize Minecraft commands in function parsing and command blocks 2024-07-01 11:58:49 -07:00
Owen1212055
977543c545 Brigadier based command API
== AT ==
public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.server.ReloadableServerResources registryLookup
public net.minecraft.server.ReloadableServerResources

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
2022-08-01 22:50:34 -04:00
Jake Potrebic
b0579722db Fix cmd permission levels for command blocks 2022-01-24 15:32:02 -08:00
chickeneer
1158ad3a6a Fix suggest command message for brigadier syntax exceptions
This is a bug accidentally introduced in upstream CB
2022-08-01 20:13:02 -05:00
Jason Penilla
6dafeceebd Vanilla command permission fixes
Fixes permission checks for vanilla commands which don't have a
requirement, as well as for namespaced vanilla commands.

== AT ==
public-f com.mojang.brigadier.tree.CommandNode requirement
2021-08-25 13:19:53 -07:00
Shane Freeder
6949e999eb Send empty commands if tab completion is disabled 2021-04-26 01:27:08 +01:00
Mariell Hoversholm
6ba5436a48 Empty commands shall not be dispatched 2021-01-06 23:38:43 +01:00
Shane Freeder
35b7f788a9 misc debugging dumps 2021-02-18 20:23:28 +00:00
Aikar
05f977e3d1 Brigadier Mojang API
Adds AsyncPlayerSendCommandsEvent
  - Allows modifying on a per command basis what command data they see.

Adds CommandRegisteredEvent
  - Allows manipulating the CommandNode to add more children/metadata for the client
2020-04-19 18:15:29 -04:00
Callahan
41218728d9 Async command map building
This adds a custom pool inorder to make sure that they are closed
without much though, as it doesn't matter if the client is not sent
commands if the server is restarting. Using the default async pool caused issues to arise
due to the shutdown logic generally being much later.
2020-04-08 02:42:14 -05:00
Sweepyoface
551d6ee71e Add UnknownCommandEvent
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2017-06-17 18:48:21 -04:00
CraftBukkit/Spigot
cabf908e4c Allow Disabling of Command TabComplete
By: md_5 <git@md-5.net>
2013-06-21 18:05:54 +10:00
CraftBukkit/Spigot
30e4583dbe Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
2024-12-11 22:26:55 +01:00