yeow-api 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeow-api",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Yeow API �?TypeScript OOP wrappers over the task protocol",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/command.ts CHANGED
@@ -25,7 +25,7 @@ export function registerCommand(name: string, options: CommandOptions): boolean
25
25
  const executor = options.executor;
26
26
  const pluginName = (globalThis as any).__plugin?.name || 'unknown';
27
27
 
28
- const cbId = (globalThis as any)._regCb((payload: CommandPayload) => {
28
+ const cbId = (globalThis as any)._registerCallback((payload: CommandPayload) => {
29
29
  const sender = payload.sender;
30
30
  if (sender?.uuid && sender.isPlayer) {
31
31
  (sender as any).sendMessage = (msg: string) => {
package/src/task.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export function post(type: string, params: Record<string, unknown> = {}): Promise<unknown> {
2
2
  return new Promise((resolve, reject) => {
3
- const cbId = (globalThis as any)._regCb((result: any) => {
3
+ const cbId = (globalThis as any)._registerCallback((result: any) => {
4
4
  if (result?.err) reject(new Error(result.err));
5
5
  else resolve(result);
6
6
  });