Skip to content

Commit a6bca0a

Browse files
committed
add support for autocompletion for server commands in client console
1 parent 143f07a commit a6bca0a

File tree

3 files changed

+129
-93
lines changed

3 files changed

+129
-93
lines changed

src/net/outbound-packets.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,13 @@ export class OutboundPackets {
482482
this.queue(packet);
483483
}
484484

485+
public sendConsoleCommand(command: string, help: string): void {
486+
const packet = new Packet(85, PacketType.DYNAMIC_SMALL);
487+
packet.putString(command);
488+
packet.putString(help);
489+
this.queue(packet);
490+
}
491+
485492
public updateSkill(skillId: number, level: number, exp: number): void {
486493
const packet = new Packet(34);
487494
packet.put(level);

src/world/actor/player/action/input-command-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface CommandActionPlugin extends ActionPlugin {
4040
/**
4141
* A directory of all command interaction plugins.
4242
*/
43-
let commandInteractions: CommandActionPlugin[] = [];
43+
export let commandInteractions: CommandActionPlugin[] = [];
4444

4545
/**
4646
* Sets the list of command interaction plugins.

0 commit comments

Comments
 (0)