mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-29 03:39:22 +00:00
Introduce sendCommand API method (#5582)
* Introduce sendCommand API method * Ensure Geyser/extension commands are caught * Remove handleCommand from the translator, use executeCommand directly * Relocate the command handling logic again, using the new one this time * Fix up the javadocs * Rename back to sendCommand, rename the packet method * Also change the bedrock command translator * And another one... * Ensure we forward commands directly when catching exceptions during command execution --------- Co-authored-by: onebeastchris <github@onechris.mozmail.com>
This commit is contained in:
@@ -107,6 +107,13 @@ public interface GeyserConnection extends Connection, CommandSource {
|
||||
*/
|
||||
void openQuickActions();
|
||||
|
||||
/**
|
||||
* Sends a command as if the player had executed it.
|
||||
*
|
||||
* @param command the command without the leading forward-slash
|
||||
*/
|
||||
void sendCommand(String command);
|
||||
|
||||
/**
|
||||
* @param javaId the Java entity ID to look up.
|
||||
* @return a {@link GeyserEntity} if present in this connection's entity tracker.
|
||||
|
||||
Reference in New Issue
Block a user