Skip to content

Commit 74836ba

Browse files
committed
reorder methods
1 parent cf30772 commit 74836ba

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/client/client.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,40 +115,40 @@ export class Client extends EventEmitter<Events> {
115115

116116
// #region Methods
117117
/**
118-
* Send a message to all clients which are subscribed to a certain area in the given world.
118+
* Send a message to all clients which are subscribed to the given world.
119119
* @param worldName World Name
120-
* @param position Message Position
121120
* @param parameters Optional Message Payload
122121
*/
123-
public localMessage(
124-
worldName: string,
125-
position: Vector3,
126-
parameters?: MessagePayload
127-
): void {
122+
public globalMessage(worldName: string, parameters?: MessagePayload): void {
128123
this.sendRawMessage({
129-
instruction: Instruction.LocalMessage,
124+
instruction: Instruction.GlobalMessage,
130125
worldName,
131-
position,
132126
parameter: parameters?.parameter,
133127
flex: parameters?.flex,
134128
})
135129
}
136130

137131
/**
138-
* Send a message to all clients which are subscribed to the given world.
132+
* Send a message to all clients which are subscribed to a certain area in the given world.
139133
* @param worldName World Name
134+
* @param position Message Position
140135
* @param parameters Optional Message Payload
141136
*/
142-
public globalMessage(worldName: string, parameters?: MessagePayload): void {
137+
public localMessage(
138+
worldName: string,
139+
position: Vector3,
140+
parameters?: MessagePayload
141+
): void {
143142
this.sendRawMessage({
144-
instruction: Instruction.GlobalMessage,
143+
instruction: Instruction.LocalMessage,
145144
worldName,
145+
position,
146146
parameter: parameters?.parameter,
147147
flex: parameters?.flex,
148148
})
149149
}
150150

151-
// Disable for now, suppress lint errors
151+
// TODO: disable for now, suppress lint errors
152152
// public recordCreate(worldName: string): void {
153153
// // TODO
154154
// throw new Error('not implemented')

0 commit comments

Comments
 (0)