Skip to content

Commit

Permalink
add support for autocompletion for server commands in client console
Browse files Browse the repository at this point in the history
  • Loading branch information
Promises committed Jul 1, 2020
1 parent 143f07a commit a6bca0a
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 93 deletions.
7 changes: 7 additions & 0 deletions src/net/outbound-packets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@ export class OutboundPackets {
this.queue(packet);
}

public sendConsoleCommand(command: string, help: string): void {
const packet = new Packet(85, PacketType.DYNAMIC_SMALL);
packet.putString(command);
packet.putString(help);
this.queue(packet);
}

public updateSkill(skillId: number, level: number, exp: number): void {
const packet = new Packet(34);
packet.put(level);
Expand Down
2 changes: 1 addition & 1 deletion src/world/actor/player/action/input-command-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface CommandActionPlugin extends ActionPlugin {
/**
* A directory of all command interaction plugins.
*/
let commandInteractions: CommandActionPlugin[] = [];
export let commandInteractions: CommandActionPlugin[] = [];

/**
* Sets the list of command interaction plugins.
Expand Down
Loading

0 comments on commit a6bca0a

Please sign in to comment.