mirror of
https://github.com/araxiaonline/wow-eluna-ts-module.git
synced 2026-06-13 02:42:22 -04:00
25 lines
597 B
TypeScript
25 lines
597 B
TypeScript
/**
|
|
* Will say hello to the world when the command .hello is entered.
|
|
* @event PLAYER_EVENT_ON_COMMAND
|
|
*/
|
|
class Hello {
|
|
onCommand: player_event_on_command = (
|
|
event: number,
|
|
player: Player,
|
|
command: string
|
|
) => {
|
|
if (command == "hello") {
|
|
const message = "Hello World command was entered!";
|
|
|
|
SendWorldMessage(message);
|
|
}
|
|
return true;
|
|
};
|
|
}
|
|
|
|
// Just say Hello to the world.
|
|
const hello = new Hello();
|
|
RegisterPlayerEvent(PlayerEvents.PLAYER_EVENT_ON_COMMAND, (...args) =>
|
|
hello.onCommand(...args)
|
|
);
|
|
|