@nativewrappers/server 0.0.168 → 0.0.170

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/common/net/Net.js CHANGED
@@ -38,7 +38,7 @@ class NetServer extends Net {
38
38
  NetServer.broadcastRaw(sources, message.__proto_name__, encoded);
39
39
  }
40
40
  static broadcast(sources, eventName, ...args) {
41
- const packed = msgpack_pack(...args);
41
+ const packed = msgpack_pack(args);
42
42
  for (const source of sources) {
43
43
  TriggerClientEventInternal(eventName, source, packed, packed.length);
44
44
  }
@@ -31,11 +31,7 @@ export declare class Player {
31
31
  */
32
32
  get Src(): string;
33
33
  /**
34
- * Gets the players ped, this is only ever set once, so subsequent calls will be
35
- * cached
36
- *
37
- * Due to the fact that the ped doesn't exist at `playerJoining` this can be
38
- * `null`
34
+ * Gets the player ped
39
35
  */
40
36
  get Ped(): Ped | null;
41
37
  get Tokens(): string[];
@@ -59,20 +59,12 @@ class Player {
59
59
  return this.source;
60
60
  }
61
61
  /**
62
- * Gets the players ped, this is only ever set once, so subsequent calls will be
63
- * cached
64
- *
65
- * Due to the fact that the ped doesn't exist at `playerJoining` this can be
66
- * `null`
62
+ * Gets the player ped
67
63
  */
68
64
  get Ped() {
69
- if (!this.ped) {
70
- const ped = GetPlayerPed(this.source);
71
- if (ped !== 0) {
72
- this.ped = new Ped(GetPlayerPed(this.source));
73
- }
74
- }
75
- return this.ped;
65
+ const ped = GetPlayerPed(this.source);
66
+ if (ped === 0) return null;
67
+ return new Ped(ped);
76
68
  }
77
69
  get Tokens() {
78
70
  return getPlayerTokens(this.source);
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.168",
11
+ "version": "0.0.170",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"