hytopia 0.5.0-dev1 → 0.5.0-dev3

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.
Files changed (45) hide show
  1. package/docs/server.chunklattice.chunkcount.md +13 -0
  2. package/docs/server.chunklattice.md +46 -0
  3. package/docs/server.defaultplayerentitycontroller.canswim.md +13 -0
  4. package/docs/server.defaultplayerentitycontroller.md +19 -0
  5. package/docs/server.defaultplayerentitycontrolleroptions.canswim.md +13 -0
  6. package/docs/server.defaultplayerentitycontrolleroptions.md +19 -0
  7. package/docs/server.entitymanager.entitycount.md +13 -0
  8. package/docs/server.entitymanager.md +21 -0
  9. package/docs/server.eventpayloads.md +2 -2
  10. package/docs/server.gameserver.md +3 -3
  11. package/docs/server.gameserver.worldmanager.md +13 -0
  12. package/docs/server.md +44 -0
  13. package/docs/server.player.md +2 -2
  14. package/docs/server.player.resetinputs.md +17 -0
  15. package/docs/server.playercamera.md +14 -0
  16. package/docs/server.playercamera.reset.md +17 -0
  17. package/docs/server.playerevent.md +14 -0
  18. package/docs/server.playereventpayloads._player.reconnected_world_.md +16 -0
  19. package/docs/server.playereventpayloads.md +19 -0
  20. package/docs/server.playermanager.md +22 -1
  21. package/docs/server.playermanager.playercount.md +13 -0
  22. package/docs/server.playermanagerevent.md +75 -0
  23. package/docs/server.playermanagereventpayloads._player_manager.player_reconnected_.md +15 -0
  24. package/docs/server.playermanagereventpayloads.md +19 -0
  25. package/docs/server.world.md +21 -0
  26. package/docs/server.world.tag.md +13 -0
  27. package/docs/server.worldmanager.createworld.md +55 -0
  28. package/docs/server.worldmanager.getallworlds.md +19 -0
  29. package/docs/server.worldmanager.getdefaultworld.md +19 -0
  30. package/docs/server.worldmanager.getworld.md +55 -0
  31. package/docs/server.worldmanager.getworldsbytag.md +55 -0
  32. package/docs/server.worldmanager.instance.md +13 -0
  33. package/docs/server.worldmanager.md +172 -0
  34. package/docs/server.worldmanagerevent.md +47 -0
  35. package/docs/server.worldmanagereventpayloads._world_manager.world_created_.md +15 -0
  36. package/docs/server.worldmanagereventpayloads.md +57 -0
  37. package/docs/server.worldoptions.md +19 -0
  38. package/docs/server.worldoptions.tag.md +13 -0
  39. package/examples/hygrounds/gc.log +11 -0
  40. package/package.json +1 -1
  41. package/server.api.json +878 -41
  42. package/server.d.ts +135 -18
  43. package/server.js +182 -145
  44. package/docs/server.gameserver.worlds.md +0 -15
  45. package/docs/server.player.leaveworld.md +0 -17
package/server.api.json CHANGED
@@ -7385,6 +7385,36 @@
7385
7385
  }
7386
7386
  ]
7387
7387
  },
7388
+ {
7389
+ "kind": "Property",
7390
+ "canonicalReference": "server!ChunkLattice#chunkCount:member",
7391
+ "docComment": "/**\n * The number of chunks in the lattice.\n */\n",
7392
+ "excerptTokens": [
7393
+ {
7394
+ "kind": "Content",
7395
+ "text": "get chunkCount(): "
7396
+ },
7397
+ {
7398
+ "kind": "Content",
7399
+ "text": "number"
7400
+ },
7401
+ {
7402
+ "kind": "Content",
7403
+ "text": ";"
7404
+ }
7405
+ ],
7406
+ "isReadonly": true,
7407
+ "isOptional": false,
7408
+ "releaseTag": "Public",
7409
+ "name": "chunkCount",
7410
+ "propertyTypeTokenRange": {
7411
+ "startIndex": 1,
7412
+ "endIndex": 2
7413
+ },
7414
+ "isStatic": false,
7415
+ "isProtected": false,
7416
+ "isAbstract": false
7417
+ },
7388
7418
  {
7389
7419
  "kind": "Method",
7390
7420
  "canonicalReference": "server!ChunkLattice#clear:member(1)",
@@ -11020,6 +11050,45 @@
11020
11050
  "isProtected": false,
11021
11051
  "isAbstract": false
11022
11052
  },
11053
+ {
11054
+ "kind": "Property",
11055
+ "canonicalReference": "server!DefaultPlayerEntityController#canSwim:member",
11056
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can swim.\n *\n * @param controller - The default player entity controller instance.\n *\n * @returns Whether the entity of the entity controller can swim.\n */\n",
11057
+ "excerptTokens": [
11058
+ {
11059
+ "kind": "Content",
11060
+ "text": "canSwim: "
11061
+ },
11062
+ {
11063
+ "kind": "Content",
11064
+ "text": "(controller: "
11065
+ },
11066
+ {
11067
+ "kind": "Reference",
11068
+ "text": "DefaultPlayerEntityController",
11069
+ "canonicalReference": "server!DefaultPlayerEntityController:class"
11070
+ },
11071
+ {
11072
+ "kind": "Content",
11073
+ "text": ") => boolean"
11074
+ },
11075
+ {
11076
+ "kind": "Content",
11077
+ "text": ";"
11078
+ }
11079
+ ],
11080
+ "isReadonly": false,
11081
+ "isOptional": false,
11082
+ "releaseTag": "Public",
11083
+ "name": "canSwim",
11084
+ "propertyTypeTokenRange": {
11085
+ "startIndex": 1,
11086
+ "endIndex": 4
11087
+ },
11088
+ "isStatic": false,
11089
+ "isProtected": false,
11090
+ "isAbstract": false
11091
+ },
11023
11092
  {
11024
11093
  "kind": "Property",
11025
11094
  "canonicalReference": "server!DefaultPlayerEntityController#canWalk:member",
@@ -11885,6 +11954,33 @@
11885
11954
  "endIndex": 2
11886
11955
  }
11887
11956
  },
11957
+ {
11958
+ "kind": "PropertySignature",
11959
+ "canonicalReference": "server!DefaultPlayerEntityControllerOptions#canSwim:member",
11960
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can swim.\n */\n",
11961
+ "excerptTokens": [
11962
+ {
11963
+ "kind": "Content",
11964
+ "text": "canSwim?: "
11965
+ },
11966
+ {
11967
+ "kind": "Content",
11968
+ "text": "() => boolean"
11969
+ },
11970
+ {
11971
+ "kind": "Content",
11972
+ "text": ";"
11973
+ }
11974
+ ],
11975
+ "isReadonly": false,
11976
+ "isOptional": true,
11977
+ "releaseTag": "Public",
11978
+ "name": "canSwim",
11979
+ "propertyTypeTokenRange": {
11980
+ "startIndex": 1,
11981
+ "endIndex": 2
11982
+ }
11983
+ },
11888
11984
  {
11889
11985
  "kind": "PropertySignature",
11890
11986
  "canonicalReference": "server!DefaultPlayerEntityControllerOptions#canWalk:member",
@@ -15453,6 +15549,36 @@
15453
15549
  "name": "EntityManager",
15454
15550
  "preserveMemberOrder": false,
15455
15551
  "members": [
15552
+ {
15553
+ "kind": "Property",
15554
+ "canonicalReference": "server!EntityManager#entityCount:member",
15555
+ "docComment": "/**\n * The number of spawned entities in the world.\n */\n",
15556
+ "excerptTokens": [
15557
+ {
15558
+ "kind": "Content",
15559
+ "text": "get entityCount(): "
15560
+ },
15561
+ {
15562
+ "kind": "Content",
15563
+ "text": "number"
15564
+ },
15565
+ {
15566
+ "kind": "Content",
15567
+ "text": ";"
15568
+ }
15569
+ ],
15570
+ "isReadonly": true,
15571
+ "isOptional": false,
15572
+ "releaseTag": "Public",
15573
+ "name": "entityCount",
15574
+ "propertyTypeTokenRange": {
15575
+ "startIndex": 1,
15576
+ "endIndex": 2
15577
+ },
15578
+ "isStatic": false,
15579
+ "isProtected": false,
15580
+ "isAbstract": false
15581
+ },
15456
15582
  {
15457
15583
  "kind": "Method",
15458
15584
  "canonicalReference": "server!EntityManager#getAllEntities:member(1)",
@@ -16275,6 +16401,15 @@
16275
16401
  "text": "WorldLoopEventPayloads",
16276
16402
  "canonicalReference": "server!WorldLoopEventPayloads:interface"
16277
16403
  },
16404
+ {
16405
+ "kind": "Content",
16406
+ "text": ", "
16407
+ },
16408
+ {
16409
+ "kind": "Reference",
16410
+ "text": "WorldManagerEventPayloads",
16411
+ "canonicalReference": "server!WorldManagerEventPayloads:interface"
16412
+ },
16278
16413
  {
16279
16414
  "kind": "Content",
16280
16415
  "text": " "
@@ -16365,6 +16500,10 @@
16365
16500
  {
16366
16501
  "startIndex": 39,
16367
16502
  "endIndex": 40
16503
+ },
16504
+ {
16505
+ "startIndex": 41,
16506
+ "endIndex": 42
16368
16507
  }
16369
16508
  ]
16370
16509
  },
@@ -17528,25 +17667,17 @@
17528
17667
  },
17529
17668
  {
17530
17669
  "kind": "Property",
17531
- "canonicalReference": "server!GameServer#worlds:member",
17532
- "docComment": "/**\n * The worlds managed by the game server.\n */\n",
17670
+ "canonicalReference": "server!GameServer#worldManager:member",
17671
+ "docComment": "/**\n * The world manager for the game server\n */\n",
17533
17672
  "excerptTokens": [
17534
17673
  {
17535
17674
  "kind": "Content",
17536
- "text": "get worlds(): "
17537
- },
17538
- {
17539
- "kind": "Content",
17540
- "text": "{\n [id: string]: "
17675
+ "text": "get worldManager(): "
17541
17676
  },
17542
17677
  {
17543
17678
  "kind": "Reference",
17544
- "text": "World",
17545
- "canonicalReference": "server!World:class"
17546
- },
17547
- {
17548
- "kind": "Content",
17549
- "text": ";\n }"
17679
+ "text": "WorldManager",
17680
+ "canonicalReference": "server!WorldManager:class"
17550
17681
  },
17551
17682
  {
17552
17683
  "kind": "Content",
@@ -17556,10 +17687,10 @@
17556
17687
  "isReadonly": true,
17557
17688
  "isOptional": false,
17558
17689
  "releaseTag": "Public",
17559
- "name": "worlds",
17690
+ "name": "worldManager",
17560
17691
  "propertyTypeTokenRange": {
17561
17692
  "startIndex": 1,
17562
- "endIndex": 4
17693
+ "endIndex": 2
17563
17694
  },
17564
17695
  "isStatic": false,
17565
17696
  "isProtected": false,
@@ -26888,65 +27019,65 @@
26888
27019
  "name": "joinWorld"
26889
27020
  },
26890
27021
  {
26891
- "kind": "Method",
26892
- "canonicalReference": "server!Player#leaveWorld:member(1)",
26893
- "docComment": "/**\n * Removes the player from the current {@link World} they are in.\n */\n",
27022
+ "kind": "Property",
27023
+ "canonicalReference": "server!Player#profilePictureUrl:member",
27024
+ "docComment": "/**\n * The profile picture URL for the player.\n */\n",
26894
27025
  "excerptTokens": [
26895
27026
  {
26896
27027
  "kind": "Content",
26897
- "text": "leaveWorld(): "
27028
+ "text": "readonly profilePictureUrl: "
26898
27029
  },
26899
27030
  {
26900
27031
  "kind": "Content",
26901
- "text": "void"
27032
+ "text": "string | undefined"
26902
27033
  },
26903
27034
  {
26904
27035
  "kind": "Content",
26905
27036
  "text": ";"
26906
27037
  }
26907
27038
  ],
26908
- "isStatic": false,
26909
- "returnTypeTokenRange": {
27039
+ "isReadonly": true,
27040
+ "isOptional": false,
27041
+ "releaseTag": "Public",
27042
+ "name": "profilePictureUrl",
27043
+ "propertyTypeTokenRange": {
26910
27044
  "startIndex": 1,
26911
27045
  "endIndex": 2
26912
27046
  },
26913
- "releaseTag": "Public",
27047
+ "isStatic": false,
26914
27048
  "isProtected": false,
26915
- "overloadIndex": 1,
26916
- "parameters": [],
26917
- "isOptional": false,
26918
- "isAbstract": false,
26919
- "name": "leaveWorld"
27049
+ "isAbstract": false
26920
27050
  },
26921
27051
  {
26922
- "kind": "Property",
26923
- "canonicalReference": "server!Player#profilePictureUrl:member",
26924
- "docComment": "/**\n * The profile picture URL for the player.\n */\n",
27052
+ "kind": "Method",
27053
+ "canonicalReference": "server!Player#resetInputs:member(1)",
27054
+ "docComment": "/**\n * Resets all inputs keys\n */\n",
26925
27055
  "excerptTokens": [
26926
27056
  {
26927
27057
  "kind": "Content",
26928
- "text": "readonly profilePictureUrl: "
27058
+ "text": "resetInputs(): "
26929
27059
  },
26930
27060
  {
26931
27061
  "kind": "Content",
26932
- "text": "string | undefined"
27062
+ "text": "void"
26933
27063
  },
26934
27064
  {
26935
27065
  "kind": "Content",
26936
27066
  "text": ";"
26937
27067
  }
26938
27068
  ],
26939
- "isReadonly": true,
26940
- "isOptional": false,
26941
- "releaseTag": "Public",
26942
- "name": "profilePictureUrl",
26943
- "propertyTypeTokenRange": {
27069
+ "isStatic": false,
27070
+ "returnTypeTokenRange": {
26944
27071
  "startIndex": 1,
26945
27072
  "endIndex": 2
26946
27073
  },
26947
- "isStatic": false,
27074
+ "releaseTag": "Public",
26948
27075
  "isProtected": false,
26949
- "isAbstract": false
27076
+ "overloadIndex": 1,
27077
+ "parameters": [],
27078
+ "isOptional": false,
27079
+ "isAbstract": false,
27080
+ "name": "resetInputs"
26950
27081
  },
26951
27082
  {
26952
27083
  "kind": "Method",
@@ -27605,6 +27736,37 @@
27605
27736
  "isProtected": false,
27606
27737
  "isAbstract": false
27607
27738
  },
27739
+ {
27740
+ "kind": "Method",
27741
+ "canonicalReference": "server!PlayerCamera#reset:member(1)",
27742
+ "docComment": "/**\n * Resets the camera to its default, unattached, spectator mode state.\n */\n",
27743
+ "excerptTokens": [
27744
+ {
27745
+ "kind": "Content",
27746
+ "text": "reset(): "
27747
+ },
27748
+ {
27749
+ "kind": "Content",
27750
+ "text": "void"
27751
+ },
27752
+ {
27753
+ "kind": "Content",
27754
+ "text": ";"
27755
+ }
27756
+ ],
27757
+ "isStatic": false,
27758
+ "returnTypeTokenRange": {
27759
+ "startIndex": 1,
27760
+ "endIndex": 2
27761
+ },
27762
+ "releaseTag": "Public",
27763
+ "isProtected": false,
27764
+ "overloadIndex": 1,
27765
+ "parameters": [],
27766
+ "isOptional": false,
27767
+ "isAbstract": false,
27768
+ "name": "reset"
27769
+ },
27608
27770
  {
27609
27771
  "kind": "Method",
27610
27772
  "canonicalReference": "server!PlayerCamera#setAttachedToEntity:member(1)",
@@ -29584,6 +29746,27 @@
29584
29746
  "releaseTag": "Public",
29585
29747
  "name": "LEFT_WORLD"
29586
29748
  },
29749
+ {
29750
+ "kind": "EnumMember",
29751
+ "canonicalReference": "server!PlayerEvent.RECONNECTED_WORLD:member",
29752
+ "docComment": "",
29753
+ "excerptTokens": [
29754
+ {
29755
+ "kind": "Content",
29756
+ "text": "RECONNECTED_WORLD = "
29757
+ },
29758
+ {
29759
+ "kind": "Content",
29760
+ "text": "\"PLAYER.RECONNECTED_WORLD\""
29761
+ }
29762
+ ],
29763
+ "initializerTokenRange": {
29764
+ "startIndex": 1,
29765
+ "endIndex": 2
29766
+ },
29767
+ "releaseTag": "Public",
29768
+ "name": "RECONNECTED_WORLD"
29769
+ },
29587
29770
  {
29588
29771
  "kind": "EnumMember",
29589
29772
  "canonicalReference": "server!PlayerEvent.REQUEST_SYNC:member",
@@ -29775,6 +29958,60 @@
29775
29958
  "endIndex": 8
29776
29959
  }
29777
29960
  },
29961
+ {
29962
+ "kind": "PropertySignature",
29963
+ "canonicalReference": "server!PlayerEventPayloads#\"PLAYER.RECONNECTED_WORLD\":member",
29964
+ "docComment": "/**\n * Emitted when a player reconnects to a world after a disconnect.\n */\n",
29965
+ "excerptTokens": [
29966
+ {
29967
+ "kind": "Content",
29968
+ "text": "["
29969
+ },
29970
+ {
29971
+ "kind": "Reference",
29972
+ "text": "PlayerEvent.RECONNECTED_WORLD",
29973
+ "canonicalReference": "server!PlayerEvent.RECONNECTED_WORLD:member"
29974
+ },
29975
+ {
29976
+ "kind": "Content",
29977
+ "text": "]: "
29978
+ },
29979
+ {
29980
+ "kind": "Content",
29981
+ "text": "{\n player: "
29982
+ },
29983
+ {
29984
+ "kind": "Reference",
29985
+ "text": "Player",
29986
+ "canonicalReference": "server!Player:class"
29987
+ },
29988
+ {
29989
+ "kind": "Content",
29990
+ "text": ";\n world: "
29991
+ },
29992
+ {
29993
+ "kind": "Reference",
29994
+ "text": "World",
29995
+ "canonicalReference": "server!World:class"
29996
+ },
29997
+ {
29998
+ "kind": "Content",
29999
+ "text": ";\n }"
30000
+ },
30001
+ {
30002
+ "kind": "Content",
30003
+ "text": ";"
30004
+ }
30005
+ ],
30006
+ "isReadonly": false,
30007
+ "isOptional": false,
30008
+ "releaseTag": "Public",
30009
+ "name": "\"PLAYER.RECONNECTED_WORLD\"",
30010
+ "propertyTypeTokenRange": {
30011
+ "startIndex": 3,
30012
+ "endIndex": 8
30013
+ }
30014
+ },
29778
30015
  {
29779
30016
  "kind": "PropertySignature",
29780
30017
  "canonicalReference": "server!PlayerEventPayloads#\"PLAYER.REQUEST_SYNC\":member",
@@ -29875,7 +30112,7 @@
29875
30112
  {
29876
30113
  "kind": "Class",
29877
30114
  "canonicalReference": "server!PlayerManager:class",
29878
- "docComment": "/**\n * Manages all connected players in a game server.\n *\n * @remarks\n *\n * The PlayerManager is created internally as a global singleton accessible with the static property `PlayerManager.instance`.\n *\n * <h2>Events</h2>\n *\n * This class is an EventRouter, and instances of it emit events with payloads listed under {@link PlayerManagerEventPayloads}\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `PlayerManager` class.\n *\n * @example\n * ```typescript\n * import { PlayerManager } from 'hytopia';\n *\n * const playerManager = PlayerManager.instance;\n * const connectedPlayers = playerManager.getConnectedPlayers();\n * ```\n *\n * @public\n */\n",
30115
+ "docComment": "/**\n * Manages all connected players in a game server.\n *\n * @remarks\n *\n * The PlayerManager is created internally as a global singleton accessible with the static property `PlayerManager.instance`.\n *\n * <h2>Events</h2>\n *\n * This class emits global events with payloads listed under {@link PlayerManagerEventPayloads}\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `PlayerManager` class.\n *\n * @example\n * ```typescript\n * import { PlayerManager } from 'hytopia';\n *\n * const playerManager = PlayerManager.instance;\n * const connectedPlayers = playerManager.getConnectedPlayers();\n * ```\n *\n * @public\n */\n",
29879
30116
  "excerptTokens": [
29880
30117
  {
29881
30118
  "kind": "Content",
@@ -30061,10 +30298,120 @@
30061
30298
  "isStatic": true,
30062
30299
  "isProtected": false,
30063
30300
  "isAbstract": false
30301
+ },
30302
+ {
30303
+ "kind": "Property",
30304
+ "canonicalReference": "server!PlayerManager#playerCount:member",
30305
+ "docComment": "/**\n * The number of players currently connected to the server.\n */\n",
30306
+ "excerptTokens": [
30307
+ {
30308
+ "kind": "Content",
30309
+ "text": "get playerCount(): "
30310
+ },
30311
+ {
30312
+ "kind": "Content",
30313
+ "text": "number"
30314
+ },
30315
+ {
30316
+ "kind": "Content",
30317
+ "text": ";"
30318
+ }
30319
+ ],
30320
+ "isReadonly": true,
30321
+ "isOptional": false,
30322
+ "releaseTag": "Public",
30323
+ "name": "playerCount",
30324
+ "propertyTypeTokenRange": {
30325
+ "startIndex": 1,
30326
+ "endIndex": 2
30327
+ },
30328
+ "isStatic": false,
30329
+ "isProtected": false,
30330
+ "isAbstract": false
30064
30331
  }
30065
30332
  ],
30066
30333
  "implementsTokenRanges": []
30067
30334
  },
30335
+ {
30336
+ "kind": "Enum",
30337
+ "canonicalReference": "server!PlayerManagerEvent:enum",
30338
+ "docComment": "/**\n * Event types a PlayerManager can emit. See {@link PlayerManagerEventPayloads} for the payloads.\n *\n * @public\n */\n",
30339
+ "excerptTokens": [
30340
+ {
30341
+ "kind": "Content",
30342
+ "text": "export declare enum PlayerManagerEvent "
30343
+ }
30344
+ ],
30345
+ "fileUrlPath": "src/players/PlayerManager.ts",
30346
+ "releaseTag": "Public",
30347
+ "name": "PlayerManagerEvent",
30348
+ "preserveMemberOrder": false,
30349
+ "members": [
30350
+ {
30351
+ "kind": "EnumMember",
30352
+ "canonicalReference": "server!PlayerManagerEvent.PLAYER_CONNECTED:member",
30353
+ "docComment": "",
30354
+ "excerptTokens": [
30355
+ {
30356
+ "kind": "Content",
30357
+ "text": "PLAYER_CONNECTED = "
30358
+ },
30359
+ {
30360
+ "kind": "Content",
30361
+ "text": "\"PLAYER_MANAGER.PLAYER_CONNECTED\""
30362
+ }
30363
+ ],
30364
+ "initializerTokenRange": {
30365
+ "startIndex": 1,
30366
+ "endIndex": 2
30367
+ },
30368
+ "releaseTag": "Public",
30369
+ "name": "PLAYER_CONNECTED"
30370
+ },
30371
+ {
30372
+ "kind": "EnumMember",
30373
+ "canonicalReference": "server!PlayerManagerEvent.PLAYER_DISCONNECTED:member",
30374
+ "docComment": "",
30375
+ "excerptTokens": [
30376
+ {
30377
+ "kind": "Content",
30378
+ "text": "PLAYER_DISCONNECTED = "
30379
+ },
30380
+ {
30381
+ "kind": "Content",
30382
+ "text": "\"PLAYER_MANAGER.PLAYER_DISCONNECTED\""
30383
+ }
30384
+ ],
30385
+ "initializerTokenRange": {
30386
+ "startIndex": 1,
30387
+ "endIndex": 2
30388
+ },
30389
+ "releaseTag": "Public",
30390
+ "name": "PLAYER_DISCONNECTED"
30391
+ },
30392
+ {
30393
+ "kind": "EnumMember",
30394
+ "canonicalReference": "server!PlayerManagerEvent.PLAYER_RECONNECTED:member",
30395
+ "docComment": "",
30396
+ "excerptTokens": [
30397
+ {
30398
+ "kind": "Content",
30399
+ "text": "PLAYER_RECONNECTED = "
30400
+ },
30401
+ {
30402
+ "kind": "Content",
30403
+ "text": "\"PLAYER_MANAGER.PLAYER_RECONNECTED\""
30404
+ }
30405
+ ],
30406
+ "initializerTokenRange": {
30407
+ "startIndex": 1,
30408
+ "endIndex": 2
30409
+ },
30410
+ "releaseTag": "Public",
30411
+ "name": "PLAYER_RECONNECTED"
30412
+ }
30413
+ ]
30414
+ },
30068
30415
  {
30069
30416
  "kind": "Interface",
30070
30417
  "canonicalReference": "server!PlayerManagerEventPayloads:interface",
@@ -30169,6 +30516,51 @@
30169
30516
  "startIndex": 3,
30170
30517
  "endIndex": 6
30171
30518
  }
30519
+ },
30520
+ {
30521
+ "kind": "PropertySignature",
30522
+ "canonicalReference": "server!PlayerManagerEventPayloads#\"PLAYER_MANAGER.PLAYER_RECONNECTED\":member",
30523
+ "docComment": "/**\n * Emitted when a player reconnects to the server.\n */\n",
30524
+ "excerptTokens": [
30525
+ {
30526
+ "kind": "Content",
30527
+ "text": "["
30528
+ },
30529
+ {
30530
+ "kind": "Reference",
30531
+ "text": "PlayerManagerEvent.PLAYER_RECONNECTED",
30532
+ "canonicalReference": "server!PlayerManagerEvent.PLAYER_RECONNECTED:member"
30533
+ },
30534
+ {
30535
+ "kind": "Content",
30536
+ "text": "]: "
30537
+ },
30538
+ {
30539
+ "kind": "Content",
30540
+ "text": "{\n player: "
30541
+ },
30542
+ {
30543
+ "kind": "Reference",
30544
+ "text": "Player",
30545
+ "canonicalReference": "server!Player:class"
30546
+ },
30547
+ {
30548
+ "kind": "Content",
30549
+ "text": ";\n }"
30550
+ },
30551
+ {
30552
+ "kind": "Content",
30553
+ "text": ";"
30554
+ }
30555
+ ],
30556
+ "isReadonly": false,
30557
+ "isOptional": false,
30558
+ "releaseTag": "Public",
30559
+ "name": "\"PLAYER_MANAGER.PLAYER_RECONNECTED\"",
30560
+ "propertyTypeTokenRange": {
30561
+ "startIndex": 3,
30562
+ "endIndex": 6
30563
+ }
30172
30564
  }
30173
30565
  ],
30174
30566
  "extendsTokenRanges": []
@@ -44129,6 +44521,36 @@
44129
44521
  "isOptional": false,
44130
44522
  "isAbstract": false,
44131
44523
  "name": "stop"
44524
+ },
44525
+ {
44526
+ "kind": "Property",
44527
+ "canonicalReference": "server!World#tag:member",
44528
+ "docComment": "/**\n * An arbitrary identifier tag of the world. Useful for your own logic.\n */\n",
44529
+ "excerptTokens": [
44530
+ {
44531
+ "kind": "Content",
44532
+ "text": "get tag(): "
44533
+ },
44534
+ {
44535
+ "kind": "Content",
44536
+ "text": "string | undefined"
44537
+ },
44538
+ {
44539
+ "kind": "Content",
44540
+ "text": ";"
44541
+ }
44542
+ ],
44543
+ "isReadonly": true,
44544
+ "isOptional": false,
44545
+ "releaseTag": "Public",
44546
+ "name": "tag",
44547
+ "propertyTypeTokenRange": {
44548
+ "startIndex": 1,
44549
+ "endIndex": 2
44550
+ },
44551
+ "isStatic": false,
44552
+ "isProtected": false,
44553
+ "isAbstract": false
44132
44554
  }
44133
44555
  ],
44134
44556
  "extendsTokenRange": {
@@ -45193,6 +45615,394 @@
45193
45615
  ],
45194
45616
  "extendsTokenRanges": []
45195
45617
  },
45618
+ {
45619
+ "kind": "Class",
45620
+ "canonicalReference": "server!WorldManager:class",
45621
+ "docComment": "/**\n * Manages all worlds in a game server.\n *\n * @remarks\n *\n * The WorldManager is created internally as a global singleton accessible with the static property `WorldManager.instance`.\n *\n * <h2>Events</h2>\n *\n * This class emits global events with payloads listed under {@link WorldManagerEventPayloads}\n *\n * @example\n * ```typescript\n * import { WorldManager } from 'hytopia';\n *\n * const worldManager = WorldManager.instance;\n * const newWorld = worldManager.createWorld({\n * name: 'My New World',\n * skyboxUri: 'skyboxes/partly-cloudy',\n * });\n * ```\n *\n * @public\n */\n",
45622
+ "excerptTokens": [
45623
+ {
45624
+ "kind": "Content",
45625
+ "text": "export default class WorldManager "
45626
+ }
45627
+ ],
45628
+ "fileUrlPath": "src/worlds/WorldManager.ts",
45629
+ "releaseTag": "Public",
45630
+ "isAbstract": false,
45631
+ "name": "WorldManager",
45632
+ "preserveMemberOrder": false,
45633
+ "members": [
45634
+ {
45635
+ "kind": "Method",
45636
+ "canonicalReference": "server!WorldManager#createWorld:member(1)",
45637
+ "docComment": "/**\n * Creates a new world.\n *\n * @param options - The options for the world.\n *\n * @param start - Whether to start the world immediately, defaults to true.\n *\n * @returns The created world.\n */\n",
45638
+ "excerptTokens": [
45639
+ {
45640
+ "kind": "Content",
45641
+ "text": "createWorld(options: "
45642
+ },
45643
+ {
45644
+ "kind": "Reference",
45645
+ "text": "Omit",
45646
+ "canonicalReference": "!Omit:type"
45647
+ },
45648
+ {
45649
+ "kind": "Content",
45650
+ "text": "<"
45651
+ },
45652
+ {
45653
+ "kind": "Reference",
45654
+ "text": "WorldOptions",
45655
+ "canonicalReference": "server!WorldOptions:interface"
45656
+ },
45657
+ {
45658
+ "kind": "Content",
45659
+ "text": ", 'id'>"
45660
+ },
45661
+ {
45662
+ "kind": "Content",
45663
+ "text": "): "
45664
+ },
45665
+ {
45666
+ "kind": "Reference",
45667
+ "text": "World",
45668
+ "canonicalReference": "server!World:class"
45669
+ },
45670
+ {
45671
+ "kind": "Content",
45672
+ "text": ";"
45673
+ }
45674
+ ],
45675
+ "isStatic": false,
45676
+ "returnTypeTokenRange": {
45677
+ "startIndex": 6,
45678
+ "endIndex": 7
45679
+ },
45680
+ "releaseTag": "Public",
45681
+ "isProtected": false,
45682
+ "overloadIndex": 1,
45683
+ "parameters": [
45684
+ {
45685
+ "parameterName": "options",
45686
+ "parameterTypeTokenRange": {
45687
+ "startIndex": 1,
45688
+ "endIndex": 5
45689
+ },
45690
+ "isOptional": false
45691
+ }
45692
+ ],
45693
+ "isOptional": false,
45694
+ "isAbstract": false,
45695
+ "name": "createWorld"
45696
+ },
45697
+ {
45698
+ "kind": "Method",
45699
+ "canonicalReference": "server!WorldManager#getAllWorlds:member(1)",
45700
+ "docComment": "/**\n * Gets all worlds.\n *\n * @returns All worlds.\n */\n",
45701
+ "excerptTokens": [
45702
+ {
45703
+ "kind": "Content",
45704
+ "text": "getAllWorlds(): "
45705
+ },
45706
+ {
45707
+ "kind": "Reference",
45708
+ "text": "World",
45709
+ "canonicalReference": "server!World:class"
45710
+ },
45711
+ {
45712
+ "kind": "Content",
45713
+ "text": "[]"
45714
+ },
45715
+ {
45716
+ "kind": "Content",
45717
+ "text": ";"
45718
+ }
45719
+ ],
45720
+ "isStatic": false,
45721
+ "returnTypeTokenRange": {
45722
+ "startIndex": 1,
45723
+ "endIndex": 3
45724
+ },
45725
+ "releaseTag": "Public",
45726
+ "isProtected": false,
45727
+ "overloadIndex": 1,
45728
+ "parameters": [],
45729
+ "isOptional": false,
45730
+ "isAbstract": false,
45731
+ "name": "getAllWorlds"
45732
+ },
45733
+ {
45734
+ "kind": "Method",
45735
+ "canonicalReference": "server!WorldManager#getDefaultWorld:member(1)",
45736
+ "docComment": "/**\n * Gets the default world.\n *\n * @returns The default world.\n */\n",
45737
+ "excerptTokens": [
45738
+ {
45739
+ "kind": "Content",
45740
+ "text": "getDefaultWorld(): "
45741
+ },
45742
+ {
45743
+ "kind": "Reference",
45744
+ "text": "World",
45745
+ "canonicalReference": "server!World:class"
45746
+ },
45747
+ {
45748
+ "kind": "Content",
45749
+ "text": ";"
45750
+ }
45751
+ ],
45752
+ "isStatic": false,
45753
+ "returnTypeTokenRange": {
45754
+ "startIndex": 1,
45755
+ "endIndex": 2
45756
+ },
45757
+ "releaseTag": "Public",
45758
+ "isProtected": false,
45759
+ "overloadIndex": 1,
45760
+ "parameters": [],
45761
+ "isOptional": false,
45762
+ "isAbstract": false,
45763
+ "name": "getDefaultWorld"
45764
+ },
45765
+ {
45766
+ "kind": "Method",
45767
+ "canonicalReference": "server!WorldManager#getWorld:member(1)",
45768
+ "docComment": "/**\n * Gets a world by its id.\n *\n * @param id - The id of the world to get.\n *\n * @returns The world with the provided id, or undefined if no world is found.\n */\n",
45769
+ "excerptTokens": [
45770
+ {
45771
+ "kind": "Content",
45772
+ "text": "getWorld(id: "
45773
+ },
45774
+ {
45775
+ "kind": "Content",
45776
+ "text": "number"
45777
+ },
45778
+ {
45779
+ "kind": "Content",
45780
+ "text": "): "
45781
+ },
45782
+ {
45783
+ "kind": "Reference",
45784
+ "text": "World",
45785
+ "canonicalReference": "server!World:class"
45786
+ },
45787
+ {
45788
+ "kind": "Content",
45789
+ "text": " | undefined"
45790
+ },
45791
+ {
45792
+ "kind": "Content",
45793
+ "text": ";"
45794
+ }
45795
+ ],
45796
+ "isStatic": false,
45797
+ "returnTypeTokenRange": {
45798
+ "startIndex": 3,
45799
+ "endIndex": 5
45800
+ },
45801
+ "releaseTag": "Public",
45802
+ "isProtected": false,
45803
+ "overloadIndex": 1,
45804
+ "parameters": [
45805
+ {
45806
+ "parameterName": "id",
45807
+ "parameterTypeTokenRange": {
45808
+ "startIndex": 1,
45809
+ "endIndex": 2
45810
+ },
45811
+ "isOptional": false
45812
+ }
45813
+ ],
45814
+ "isOptional": false,
45815
+ "isAbstract": false,
45816
+ "name": "getWorld"
45817
+ },
45818
+ {
45819
+ "kind": "Method",
45820
+ "canonicalReference": "server!WorldManager#getWorldsByTag:member(1)",
45821
+ "docComment": "/**\n * Gets all worlds with a specific tag.\n *\n * @param tag - The tag to get the worlds for.\n *\n * @returns All worlds with the provided tag.\n */\n",
45822
+ "excerptTokens": [
45823
+ {
45824
+ "kind": "Content",
45825
+ "text": "getWorldsByTag(tag: "
45826
+ },
45827
+ {
45828
+ "kind": "Content",
45829
+ "text": "string"
45830
+ },
45831
+ {
45832
+ "kind": "Content",
45833
+ "text": "): "
45834
+ },
45835
+ {
45836
+ "kind": "Reference",
45837
+ "text": "World",
45838
+ "canonicalReference": "server!World:class"
45839
+ },
45840
+ {
45841
+ "kind": "Content",
45842
+ "text": "[]"
45843
+ },
45844
+ {
45845
+ "kind": "Content",
45846
+ "text": ";"
45847
+ }
45848
+ ],
45849
+ "isStatic": false,
45850
+ "returnTypeTokenRange": {
45851
+ "startIndex": 3,
45852
+ "endIndex": 5
45853
+ },
45854
+ "releaseTag": "Public",
45855
+ "isProtected": false,
45856
+ "overloadIndex": 1,
45857
+ "parameters": [
45858
+ {
45859
+ "parameterName": "tag",
45860
+ "parameterTypeTokenRange": {
45861
+ "startIndex": 1,
45862
+ "endIndex": 2
45863
+ },
45864
+ "isOptional": false
45865
+ }
45866
+ ],
45867
+ "isOptional": false,
45868
+ "isAbstract": false,
45869
+ "name": "getWorldsByTag"
45870
+ },
45871
+ {
45872
+ "kind": "Property",
45873
+ "canonicalReference": "server!WorldManager.instance:member",
45874
+ "docComment": "/**\n * The global WorldManager instance as a singleton.\n */\n",
45875
+ "excerptTokens": [
45876
+ {
45877
+ "kind": "Content",
45878
+ "text": "static readonly instance: "
45879
+ },
45880
+ {
45881
+ "kind": "Reference",
45882
+ "text": "WorldManager",
45883
+ "canonicalReference": "server!WorldManager:class"
45884
+ },
45885
+ {
45886
+ "kind": "Content",
45887
+ "text": ";"
45888
+ }
45889
+ ],
45890
+ "isReadonly": true,
45891
+ "isOptional": false,
45892
+ "releaseTag": "Public",
45893
+ "name": "instance",
45894
+ "propertyTypeTokenRange": {
45895
+ "startIndex": 1,
45896
+ "endIndex": 2
45897
+ },
45898
+ "isStatic": true,
45899
+ "isProtected": false,
45900
+ "isAbstract": false
45901
+ }
45902
+ ],
45903
+ "implementsTokenRanges": []
45904
+ },
45905
+ {
45906
+ "kind": "Enum",
45907
+ "canonicalReference": "server!WorldManagerEvent:enum",
45908
+ "docComment": "/**\n * Event types a WorldManager instance can emit to the global event router. See {@link WorldManagerEventPayloads} for the payloads.\n *\n * @public\n */\n",
45909
+ "excerptTokens": [
45910
+ {
45911
+ "kind": "Content",
45912
+ "text": "export declare enum WorldManagerEvent "
45913
+ }
45914
+ ],
45915
+ "fileUrlPath": "src/worlds/WorldManager.ts",
45916
+ "releaseTag": "Public",
45917
+ "name": "WorldManagerEvent",
45918
+ "preserveMemberOrder": false,
45919
+ "members": [
45920
+ {
45921
+ "kind": "EnumMember",
45922
+ "canonicalReference": "server!WorldManagerEvent.WORLD_CREATED:member",
45923
+ "docComment": "",
45924
+ "excerptTokens": [
45925
+ {
45926
+ "kind": "Content",
45927
+ "text": "WORLD_CREATED = "
45928
+ },
45929
+ {
45930
+ "kind": "Content",
45931
+ "text": "\"WORLD_MANAGER.WORLD_CREATED\""
45932
+ }
45933
+ ],
45934
+ "initializerTokenRange": {
45935
+ "startIndex": 1,
45936
+ "endIndex": 2
45937
+ },
45938
+ "releaseTag": "Public",
45939
+ "name": "WORLD_CREATED"
45940
+ }
45941
+ ]
45942
+ },
45943
+ {
45944
+ "kind": "Interface",
45945
+ "canonicalReference": "server!WorldManagerEventPayloads:interface",
45946
+ "docComment": "/**\n * Event payloads for WorldManager emitted events.\n *\n * @public\n */\n",
45947
+ "excerptTokens": [
45948
+ {
45949
+ "kind": "Content",
45950
+ "text": "export interface WorldManagerEventPayloads "
45951
+ }
45952
+ ],
45953
+ "fileUrlPath": "src/worlds/WorldManager.ts",
45954
+ "releaseTag": "Public",
45955
+ "name": "WorldManagerEventPayloads",
45956
+ "preserveMemberOrder": false,
45957
+ "members": [
45958
+ {
45959
+ "kind": "PropertySignature",
45960
+ "canonicalReference": "server!WorldManagerEventPayloads#\"WORLD_MANAGER.WORLD_CREATED\":member",
45961
+ "docComment": "/**\n * Emitted when a world is created.\n */\n",
45962
+ "excerptTokens": [
45963
+ {
45964
+ "kind": "Content",
45965
+ "text": "["
45966
+ },
45967
+ {
45968
+ "kind": "Reference",
45969
+ "text": "WorldManagerEvent.WORLD_CREATED",
45970
+ "canonicalReference": "server!WorldManagerEvent.WORLD_CREATED:member"
45971
+ },
45972
+ {
45973
+ "kind": "Content",
45974
+ "text": "]: "
45975
+ },
45976
+ {
45977
+ "kind": "Content",
45978
+ "text": "{\n world: "
45979
+ },
45980
+ {
45981
+ "kind": "Reference",
45982
+ "text": "World",
45983
+ "canonicalReference": "server!World:class"
45984
+ },
45985
+ {
45986
+ "kind": "Content",
45987
+ "text": ";\n }"
45988
+ },
45989
+ {
45990
+ "kind": "Content",
45991
+ "text": ";"
45992
+ }
45993
+ ],
45994
+ "isReadonly": false,
45995
+ "isOptional": false,
45996
+ "releaseTag": "Public",
45997
+ "name": "\"WORLD_MANAGER.WORLD_CREATED\"",
45998
+ "propertyTypeTokenRange": {
45999
+ "startIndex": 3,
46000
+ "endIndex": 6
46001
+ }
46002
+ }
46003
+ ],
46004
+ "extendsTokenRanges": []
46005
+ },
45196
46006
  {
45197
46007
  "kind": "Interface",
45198
46008
  "canonicalReference": "server!WorldMap:interface",
@@ -45604,6 +46414,33 @@
45604
46414
  "endIndex": 2
45605
46415
  }
45606
46416
  },
46417
+ {
46418
+ "kind": "PropertySignature",
46419
+ "canonicalReference": "server!WorldOptions#tag:member",
46420
+ "docComment": "/**\n * An arbitrary identifier tag of the world. Useful for your own logic\n */\n",
46421
+ "excerptTokens": [
46422
+ {
46423
+ "kind": "Content",
46424
+ "text": "tag?: "
46425
+ },
46426
+ {
46427
+ "kind": "Content",
46428
+ "text": "string"
46429
+ },
46430
+ {
46431
+ "kind": "Content",
46432
+ "text": ";"
46433
+ }
46434
+ ],
46435
+ "isReadonly": false,
46436
+ "isOptional": true,
46437
+ "releaseTag": "Public",
46438
+ "name": "tag",
46439
+ "propertyTypeTokenRange": {
46440
+ "startIndex": 1,
46441
+ "endIndex": 2
46442
+ }
46443
+ },
45607
46444
  {
45608
46445
  "kind": "PropertySignature",
45609
46446
  "canonicalReference": "server!WorldOptions#tickRate:member",