pumpkin-api-py 0.1.0__py3-none-any.whl

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 (108) hide show
  1. componentize_py_async_support/__init__.py +570 -0
  2. componentize_py_async_support/futures.py +149 -0
  3. componentize_py_async_support/streams.py +345 -0
  4. componentize_py_runtime.pyi +40 -0
  5. componentize_py_types.py +32 -0
  6. poll_loop.py +440 -0
  7. pumpkin_api/__init__.py +41 -0
  8. pumpkin_api/build.py +68 -0
  9. pumpkin_api/impl.py +355 -0
  10. pumpkin_api/wit/advancement.wit +41 -0
  11. pumpkin_api/wit/attributes.wit +56 -0
  12. pumpkin_api/wit/bedrock-packets.wit +1709 -0
  13. pumpkin_api/wit/biomes.wit +72 -0
  14. pumpkin_api/wit/block-entity.wit +423 -0
  15. pumpkin_api/wit/boss-bar.wit +83 -0
  16. pumpkin_api/wit/command.wit +244 -0
  17. pumpkin_api/wit/common.wit +261 -0
  18. pumpkin_api/wit/context.wit +61 -0
  19. pumpkin_api/wit/damage-types.wit +57 -0
  20. pumpkin_api/wit/data-components.wit +117 -0
  21. pumpkin_api/wit/datapack.wit +54 -0
  22. pumpkin_api/wit/display.wit +171 -0
  23. pumpkin_api/wit/enchantments.wit +102 -0
  24. pumpkin_api/wit/entity-statuses.wit +68 -0
  25. pumpkin_api/wit/entity-types.wit +164 -0
  26. pumpkin_api/wit/entity.wit +1 -0
  27. pumpkin_api/wit/event.wit +2435 -0
  28. pumpkin_api/wit/forms.wit +51 -0
  29. pumpkin_api/wit/game-events.wit +67 -0
  30. pumpkin_api/wit/game-rules.wit +69 -0
  31. pumpkin_api/wit/gui.wit +39 -0
  32. pumpkin_api/wit/i18n.wit +21 -0
  33. pumpkin_api/wit/inventory.wit +78 -0
  34. pumpkin_api/wit/ipc.wit +7 -0
  35. pumpkin_api/wit/item-stack.wit +104 -0
  36. pumpkin_api/wit/java-dialogs.wit +155 -0
  37. pumpkin_api/wit/java-packets.wit +1838 -0
  38. pumpkin_api/wit/log.wit +14 -0
  39. pumpkin_api/wit/metadata.wit +19 -0
  40. pumpkin_api/wit/particles.wit +131 -0
  41. pumpkin_api/wit/permission.wit +46 -0
  42. pumpkin_api/wit/player.wit +1432 -0
  43. pumpkin_api/wit/plugin.wit +121 -0
  44. pumpkin_api/wit/potions.wit +52 -0
  45. pumpkin_api/wit/recipe.wit +88 -0
  46. pumpkin_api/wit/scheduler.wit +24 -0
  47. pumpkin_api/wit/scoreboard.wit +111 -0
  48. pumpkin_api/wit/screens.wit +31 -0
  49. pumpkin_api/wit/server.wit +286 -0
  50. pumpkin_api/wit/sounds.wit +1987 -0
  51. pumpkin_api/wit/statistics.wit +94 -0
  52. pumpkin_api/wit/status-effect.wit +54 -0
  53. pumpkin_api/wit/text.wit +68 -0
  54. pumpkin_api/wit/uuid.wit +16 -0
  55. pumpkin_api/wit/world.wit +1050 -0
  56. pumpkin_api_py-0.1.0.dist-info/METADATA +53 -0
  57. pumpkin_api_py-0.1.0.dist-info/RECORD +108 -0
  58. pumpkin_api_py-0.1.0.dist-info/WHEEL +4 -0
  59. pumpkin_api_py-0.1.0.dist-info/entry_points.txt +2 -0
  60. pumpkin_api_py-0.1.0.dist-info/licenses/LICENSE-APACHE +176 -0
  61. pumpkin_api_py-0.1.0.dist-info/licenses/LICENSE-MIT +21 -0
  62. wit_world/__init__.py +114 -0
  63. wit_world/exports/__init__.py +19 -0
  64. wit_world/exports/metadata.py +24 -0
  65. wit_world/imports/__init__.py +0 -0
  66. wit_world/imports/advancement.py +56 -0
  67. wit_world/imports/attributes.py +66 -0
  68. wit_world/imports/bedrock_packets.py +2413 -0
  69. wit_world/imports/biomes.py +81 -0
  70. wit_world/imports/block_entity.py +1353 -0
  71. wit_world/imports/boss_bar.py +137 -0
  72. wit_world/imports/command.py +705 -0
  73. wit_world/imports/common.py +335 -0
  74. wit_world/imports/context.py +91 -0
  75. wit_world/imports/damage_types.py +66 -0
  76. wit_world/imports/data_components.py +126 -0
  77. wit_world/imports/datapack.py +124 -0
  78. wit_world/imports/display.py +295 -0
  79. wit_world/imports/enchantments.py +129 -0
  80. wit_world/imports/entity_statuses.py +77 -0
  81. wit_world/imports/entity_types.py +173 -0
  82. wit_world/imports/event.py +3558 -0
  83. wit_world/imports/forms.py +98 -0
  84. wit_world/imports/game_events.py +76 -0
  85. wit_world/imports/game_rules.py +88 -0
  86. wit_world/imports/gui.py +81 -0
  87. wit_world/imports/i18n.py +35 -0
  88. wit_world/imports/inventory.py +159 -0
  89. wit_world/imports/ipc.py +20 -0
  90. wit_world/imports/item_stack.py +206 -0
  91. wit_world/imports/java_dialogs.py +208 -0
  92. wit_world/imports/java_packets.py +3560 -0
  93. wit_world/imports/logging.py +30 -0
  94. wit_world/imports/particles.py +140 -0
  95. wit_world/imports/permission.py +71 -0
  96. wit_world/imports/player.py +1753 -0
  97. wit_world/imports/potions.py +61 -0
  98. wit_world/imports/recipe.py +120 -0
  99. wit_world/imports/scheduler.py +44 -0
  100. wit_world/imports/scoreboard.py +167 -0
  101. wit_world/imports/screens.py +40 -0
  102. wit_world/imports/server.py +493 -0
  103. wit_world/imports/sounds.py +1996 -0
  104. wit_world/imports/statistics.py +103 -0
  105. wit_world/imports/status_effect.py +63 -0
  106. wit_world/imports/text.py +156 -0
  107. wit_world/imports/uuid.py +36 -0
  108. wit_world/imports/world.py +1640 -0
@@ -0,0 +1,1753 @@
1
+ # This file is automatically generated by componentize-py
2
+ # It is not intended for manual editing.
3
+ """
4
+ Represents a player connected to the Minecraft server.
5
+ """
6
+ from typing import TypeVar, Generic, Union, Optional, Protocol, Tuple, List, Any, Self, Callable
7
+ from types import TracebackType
8
+ from enum import Flag, Enum, auto
9
+ from dataclasses import dataclass
10
+ from abc import abstractmethod
11
+ import weakref
12
+
13
+ from componentize_py_types import Result, Ok, Err, Some
14
+ from ..imports import common
15
+ from ..imports import damage_types
16
+ from ..imports import entity_statuses
17
+ from ..imports import particles
18
+ from ..imports import permission
19
+ from ..imports import sounds
20
+ from ..imports import statistics
21
+ from ..imports import status_effect
22
+ from ..imports import text
23
+ from ..imports import advancement
24
+ from ..imports import forms
25
+ from ..imports import item_stack
26
+ from ..imports import inventory
27
+ from ..imports import gui
28
+ from ..imports import java_dialogs
29
+ from ..imports import scoreboard
30
+ from ..imports import uuid
31
+ from ..imports import bedrock_packets
32
+ from ..imports import java_packets
33
+ from ..imports import world
34
+
35
+ class PlayerWeather(Enum):
36
+ """
37
+ Represents per-player weather condition overrides.
38
+ """
39
+ CLEAR = 0
40
+ DOWNFALL = 1
41
+
42
+ class ProjectileType(Enum):
43
+ """
44
+ Types of projectiles that can be launched by a player.
45
+ """
46
+ ARROW = 0
47
+ SNOWBALL = 1
48
+ EGG = 2
49
+ ENDER_PEARL = 3
50
+ SPLASH_POTION = 4
51
+ FIREBALL = 5
52
+ SMALL_FIREBALL = 6
53
+ TRIDENT = 7
54
+ WIND_CHARGE = 8
55
+
56
+ class ClientGameEvent(Enum):
57
+ """
58
+ Types of clientbound game events.
59
+ """
60
+ NO_RESPAWN_BLOCK_AVAILABLE = 0
61
+ BEGIN_RAINING = 1
62
+ END_RAINING = 2
63
+ CHANGE_GAME_MODE = 3
64
+ WIN_GAME = 4
65
+ DEMO_EVENT = 5
66
+ ARROW_HIT_PLAYER = 6
67
+ RAIN_LEVEL_CHANGE = 7
68
+ THUNDER_LEVEL_CHANGE = 8
69
+ PLAY_PUFFERFISH_STRING_SOUND = 9
70
+ PLAY_ELDER_GUARDIAN_MOB_APPEARANCE = 10
71
+ ENABLED_RESPAWN_SCREEN = 11
72
+ LIMITED_CRAFTING = 12
73
+ START_WAITING_CHUNKS = 13
74
+
75
+ class KnownServerLink(Enum):
76
+ """
77
+ Built-in known server link types displayed in the client Escape pause menu.
78
+ """
79
+ BUG_REPORT = 0
80
+ COMMUNITY_GUIDELINES = 1
81
+ SUPPORT = 2
82
+ STATUS = 3
83
+ FEEDBACK = 4
84
+ COMMUNITY = 5
85
+ WEBSITE = 6
86
+ FORUMS = 7
87
+ NEWS = 8
88
+ ANNOUNCEMENTS = 9
89
+
90
+
91
+ @dataclass
92
+ class ServerLinkLabel_Known:
93
+ value: KnownServerLink
94
+
95
+
96
+ @dataclass
97
+ class ServerLinkLabel_Custom:
98
+ value: text.TextComponent
99
+
100
+
101
+ ServerLinkLabel = Union[ServerLinkLabel_Known, ServerLinkLabel_Custom]
102
+ """
103
+ Label for a server link: either a built-in standard link type or a custom text component.
104
+ """
105
+
106
+
107
+ @dataclass
108
+ class ServerLink:
109
+ """
110
+ Represents a server link entry with a label and destination URL.
111
+ """
112
+ label: ServerLinkLabel
113
+ url: str
114
+
115
+ @dataclass
116
+ class PlayerAbilities:
117
+ """
118
+ Various abilities a player can have.
119
+ """
120
+ invulnerable: bool
121
+ flying: bool
122
+ allow_flying: bool
123
+ creative: bool
124
+ allow_modify_world: bool
125
+ fly_speed: float
126
+ walk_speed: float
127
+
128
+ @dataclass
129
+ class PlayerSkin:
130
+ """
131
+ Represents a player's skin textures and metadata.
132
+ """
133
+ value: str
134
+ signature: Optional[str]
135
+
136
+ class SkinParts(Flag):
137
+ """
138
+ Represents which skin parts are visible.
139
+ """
140
+ CAPE = auto()
141
+ JACKET = auto()
142
+ LEFT_SLEEVE = auto()
143
+ RIGHT_SLEEVE = auto()
144
+ LEFT_PANTS_LEG = auto()
145
+ RIGHT_PANTS_LEG = auto()
146
+ HAT = auto()
147
+
148
+ class BedrockAbility(Enum):
149
+ """
150
+ Represents the various abilities a Bedrock Edition player can have.
151
+ """
152
+ BUILD = 0
153
+ MINE = 1
154
+ DOORS_AND_SWITCHES = 2
155
+ OPEN_CONTAINERS = 3
156
+ ATTACK_PLAYERS = 4
157
+ ATTACK_MOBS = 5
158
+ OPERATOR_COMMANDS = 6
159
+ TELEPORT = 7
160
+ INVULNERABLE = 8
161
+ FLYING = 9
162
+ MAY_FLY = 10
163
+ INSTABUILD = 11
164
+ LIGHTNING = 12
165
+ FLY_SPEED = 13
166
+ WALK_SPEED = 14
167
+ MUTED = 15
168
+ WORLD_BUILDER = 16
169
+ NO_CLIP = 17
170
+ PRIVILEGED_BUILDER = 18
171
+ VERTICAL_FLY_SPEED = 19
172
+
173
+ class BedrockStatusFlag(Enum):
174
+ """
175
+ Represents the various status flags a Bedrock Edition entity can have.
176
+ These flags control client-side rendering and behavior.
177
+ """
178
+ ON_FIRE = 0
179
+ SNEAKING = 1
180
+ RIDING = 2
181
+ SPRINTING = 3
182
+ USING_ITEM = 4
183
+ INVISIBLE = 5
184
+ TEMPTED = 6
185
+ IN_LOVE = 7
186
+ SADDLED = 8
187
+ POWERED = 9
188
+ IGNITED = 10
189
+ BABY = 11
190
+ CONVERTING = 12
191
+ CRITICAL = 13
192
+ SHOW_NAME = 14
193
+ ALWAYS_SHOW_NAME = 15
194
+ NO_AI = 16
195
+ SILENT = 17
196
+ WALL_CLIMBING = 18
197
+ CLIMB = 19
198
+ SWIM = 20
199
+ FLY = 21
200
+ WALK = 22
201
+ RESTING = 23
202
+ SITTING = 24
203
+ ANGRY = 25
204
+ INTERESTED = 26
205
+ CHARGED = 27
206
+ TAMED = 28
207
+ ORPHANED = 29
208
+ LEASHED = 30
209
+ SHEARED = 31
210
+ GLIDING = 32
211
+ ELDER = 33
212
+ MOVING = 34
213
+ BREATHING = 35
214
+ CHESTED = 36
215
+ STACKABLE = 37
216
+ SHOW_BOTTOM = 38
217
+ STANDING = 39
218
+ SHAKING = 40
219
+ IDLING = 41
220
+ CASTING = 42
221
+ CHARGING = 43
222
+ KEYBOARD_CONTROLLED = 44
223
+ POWER_JUMP = 45
224
+ DASH = 46
225
+ LINGERING = 47
226
+ HAS_COLLISION = 48
227
+ HAS_GRAVITY = 49
228
+ FIRE_IMMUNE = 50
229
+ DANCING = 51
230
+ ENCHANTED = 52
231
+ RETURN_TRIDENT = 53
232
+ CONTAINER_PRIVATE = 54
233
+ TRANSFORMING = 55
234
+ DAMAGE_NEARBY_MOBS = 56
235
+ SWIMMING = 57
236
+ BRIBED = 58
237
+ PREGNANT = 59
238
+ LAYING_EGG = 60
239
+ PASSENGER_CAN_PICK = 61
240
+ TRANSITION_SITTING = 62
241
+ EATING = 63
242
+ LAYING_DOWN = 64
243
+ SNEEZING = 65
244
+ TRUSTING = 66
245
+ ROLLING = 67
246
+ SCARED = 68
247
+ IN_SCAFFOLDING = 69
248
+ OVER_SCAFFOLDING = 70
249
+ DESCEND_THROUGH_BLOCK = 71
250
+ BLOCKING = 72
251
+ TRANSITION_BLOCKING = 73
252
+ BLOCKED_USING_SHIELD = 74
253
+ BLOCKED_USING_DAMAGED_SHIELD = 75
254
+ SLEEPING = 76
255
+ WANTS_TO_WAKE = 77
256
+ TRADE_INTEREST = 78
257
+ DOOR_BREAKER = 79
258
+ BREAKING_OBSTRUCTION = 80
259
+ DOOR_OPENER = 81
260
+ CAPTAIN = 82
261
+ STUNNED = 83
262
+ ROARING = 84
263
+ DELAYED_ATTACK = 85
264
+ AVOIDING_MOBS = 86
265
+ AVOIDING_BLOCK = 87
266
+ FACING_TARGET_TO_RANGE_ATTACK = 88
267
+ HIDDEN_WHEN_INVISIBLE = 89
268
+ IN_UI = 90
269
+ STALKING = 91
270
+ EMOTING = 92
271
+ CELEBRATING = 93
272
+ ADMIRING = 94
273
+ CELEBRATING_SPECIAL = 95
274
+ OUT_OF_CONTROL = 96
275
+ RAM_ATTACK = 97
276
+ PLAYING_DEAD = 98
277
+ IN_ASCENDING_BLOCK = 99
278
+ OVER_DESCENDING_BLOCK = 100
279
+ CROAKING = 101
280
+ DIGEST_MOB = 102
281
+ JUMP_GOAL = 103
282
+ EMERGING = 104
283
+ SNIFFING = 105
284
+ DIGGING = 106
285
+ SONIC_BOOM = 107
286
+ HAS_DASH_TIMEOUT = 108
287
+ PUSH_TOWARDS_CLOSEST_SPACE = 109
288
+ SCENTING = 110
289
+ RISING = 111
290
+ FEELING_HAPPY = 112
291
+ SEARCHING = 113
292
+ CRAWLING = 114
293
+ BODY_ROTATION_BLOCKED = 115
294
+ RENDER_WHEN_INVISIBLE = 116
295
+ BODY_ROTATION_AXIS_ALIGNED = 117
296
+ COLLIDABLE = 118
297
+ WASD_AIR_CONTROLLED = 119
298
+ DOES_SERVER_AUTH_ONLY_DISMOUNT = 120
299
+ BODY_ROTATION_ALWAYS_FOLLOWS_HEAD = 121
300
+ CAN_USE_VERTICAL_MOVEMENT_ACTION = 122
301
+ ROTATION_LOCKED_TO_VEHICLE = 123
302
+
303
+ class JavaMinecraftVersion(Enum):
304
+ """
305
+ Represents a specific version of the Minecraft Java Edition protocol.
306
+ """
307
+ V_1_7_2 = 0
308
+ V_1_7_6 = 1
309
+ V_1_8 = 2
310
+ V_1_9 = 3
311
+ V_1_9_1 = 4
312
+ V_1_9_2 = 5
313
+ V_1_9_3 = 6
314
+ V_1_10 = 7
315
+ V_1_11 = 8
316
+ V_1_11_1 = 9
317
+ V_1_12 = 10
318
+ V_1_12_1 = 11
319
+ V_1_12_2 = 12
320
+ V_1_13 = 13
321
+ V_1_13_1 = 14
322
+ V_1_13_2 = 15
323
+ V_1_14 = 16
324
+ V_1_14_1 = 17
325
+ V_1_14_2 = 18
326
+ V_1_14_3 = 19
327
+ V_1_14_4 = 20
328
+ V_1_15 = 21
329
+ V_1_15_1 = 22
330
+ V_1_15_2 = 23
331
+ V_1_16 = 24
332
+ V_1_16_1 = 25
333
+ V_1_16_2 = 26
334
+ V_1_16_3 = 27
335
+ V_1_16_4 = 28
336
+ V_1_17 = 29
337
+ V_1_17_1 = 30
338
+ V_1_18 = 31
339
+ V_1_18_2 = 32
340
+ V_1_19 = 33
341
+ V_1_19_1 = 34
342
+ V_1_19_3 = 35
343
+ V_1_19_4 = 36
344
+ V_1_20 = 37
345
+ V_1_20_2 = 38
346
+ V_1_20_3 = 39
347
+ V_1_20_5 = 40
348
+ V_1_21 = 41
349
+ V_1_21_2 = 42
350
+ V_1_21_4 = 43
351
+ V_1_21_5 = 44
352
+ V_1_21_6 = 45
353
+ V_1_21_7 = 46
354
+ V_1_21_9 = 47
355
+ V_1_21_11 = 48
356
+ V_26_1 = 49
357
+ V_26_2 = 50
358
+ UNKNOWN = 51
359
+
360
+ class BedrockMinecraftVersion(Enum):
361
+ """
362
+ Represents a specific version of the Minecraft Bedrock Edition protocol.
363
+ """
364
+ V_1_21 = 0
365
+ V_1_26_30 = 1
366
+ UNKNOWN = 2
367
+
368
+ class ChatMode(Enum):
369
+ """
370
+ The chat visibility settings for a player.
371
+ """
372
+ ENABLED = 0
373
+ COMMANDS_ONLY = 1
374
+ HIDDEN = 2
375
+
376
+ @dataclass
377
+ class JavaPlayerSettings:
378
+ """
379
+ Represents settings for a Java Edition player.
380
+ """
381
+ locale: str
382
+ view_distance: int
383
+ chat_mode: ChatMode
384
+ chat_colors: bool
385
+ skin_parts: SkinParts
386
+ main_hand: common.Hand
387
+ text_filtering: bool
388
+ server_listing: bool
389
+
390
+ class BedrockDeviceOs(Enum):
391
+ """
392
+ Represents the operating system of a Bedrock Edition client.
393
+ """
394
+ ANDROID = 0
395
+ IOS = 1
396
+ OSX = 2
397
+ AMAZON = 3
398
+ GEAR_VR = 4
399
+ HOLO_LENS = 5
400
+ WINDOWS_10 = 6
401
+ WIN_32 = 7
402
+ DEDICATED = 8
403
+ TV_OS = 9
404
+ PLAYSTATION = 10
405
+ NINTENDO = 11
406
+ XBOX = 12
407
+ WINDOWS_PHONE = 13
408
+ LINUX = 14
409
+ UNKNOWN = 15
410
+
411
+ class BedrockInputMode(Enum):
412
+ """
413
+ Represents the input mode used by a Bedrock Edition client.
414
+ """
415
+ UNKNOWN = 0
416
+ MOUSE = 1
417
+ TOUCH = 2
418
+ GAME_PAD = 3
419
+ MOTION_CONTROLLER = 4
420
+
421
+ class BedrockUiProfile(Enum):
422
+ """
423
+ Represents the UI profile used by a Bedrock Edition client.
424
+ """
425
+ CLASSIC = 0
426
+ POCKET = 1
427
+ UNKNOWN = 2
428
+
429
+ class BedrockGraphicsMode(Enum):
430
+ """
431
+ Represents the graphics mode used by a Bedrock Edition client.
432
+ """
433
+ SIMPLE = 0
434
+ FANCY = 1
435
+ RAY_TRACED = 2
436
+ UNKNOWN = 3
437
+
438
+ @dataclass
439
+ class BedrockPlayerSettings:
440
+ """
441
+ Represents settings and client data for a Bedrock Edition player.
442
+ """
443
+ game_version: str
444
+ device_os: BedrockDeviceOs
445
+ device_id: str
446
+ device_model: str
447
+ language_code: str
448
+ current_input_mode: BedrockInputMode
449
+ default_input_mode: BedrockInputMode
450
+ ui_profile: BedrockUiProfile
451
+ gui_scale: int
452
+ is_editor_mode: bool
453
+ max_view_distance: int
454
+ memory_tier: int
455
+ graphics_mode: BedrockGraphicsMode
456
+ playfab_id: str
457
+ client_random_id: int
458
+ platform_offline_id: str
459
+ platform_online_id: str
460
+ skin_id: str
461
+ arm_size: str
462
+ is_persona_skin: bool
463
+ is_premium_skin: bool
464
+ is_trusted_skin: bool
465
+
466
+ class BedrockDisconnectReason(Enum):
467
+ """
468
+ Protocol-level disconnect reasons for Minecraft Bedrock Edition.
469
+ """
470
+ UNKNOWN = 0
471
+ CANT_CONNECT_NO_INTERNET = 1
472
+ NO_PERMISSIONS = 2
473
+ UNRECOVERABLE_ERROR = 3
474
+ THIRD_PARTY_BLOCKED = 4
475
+ THIRD_PARTY_NO_INTERNET = 5
476
+ THIRD_PARTY_BAD_IP = 6
477
+ THIRD_PARTY_NO_SERVER_OR_SERVER_LOCKED = 7
478
+ VERSION_MISMATCH = 8
479
+ SKIN_ISSUE = 9
480
+ INVITE_SESSION_NOT_FOUND = 10
481
+ EDU_LEVEL_SETTINGS_MISSING = 11
482
+ LOCAL_SERVER_NOT_FOUND = 12
483
+ LEGACY_DISCONNECT = 13
484
+ USER_LEAVE_GAME_ATTEMPTED = 14
485
+ PLATFORM_LOCKED_SKINS_ERROR = 15
486
+ REALMS_WORLD_UNASSIGNED = 16
487
+ REALMS_SERVER_CANT_CONNECT = 17
488
+ REALMS_SERVER_HIDDEN = 18
489
+ REALMS_SERVER_DISABLED_BETA = 19
490
+ REALMS_SERVER_DISABLED = 20
491
+ CROSS_PLATFORM_DISABLED = 21
492
+ CANT_CONNECT = 22
493
+ SESSION_NOT_FOUND = 23
494
+ CLIENT_SETTINGS_INCOMPATIBLE_WITH_SERVER = 24
495
+ SERVER_FULL = 25
496
+ INVALID_PLATFORM_SKIN = 26
497
+ EDITION_VERSION_MISMATCH = 27
498
+ EDITION_MISMATCH = 28
499
+ LEVEL_NEWER_THAN_EXE_VERSION = 29
500
+ NO_FAIL_OCCURRED = 30
501
+ BANNED_SKIN = 31
502
+ TIMEOUT = 32
503
+ SERVER_NOT_FOUND = 33
504
+ OUTDATED_SERVER = 34
505
+ OUTDATED_CLIENT = 35
506
+ NO_PREMIUM_PLATFORM = 36
507
+ MULTIPLAYER_DISABLED = 37
508
+ NO_WIFI = 38
509
+ WORLD_CORRUPTION = 39
510
+ NO_REASON = 40
511
+ DISCONNECTED = 41
512
+ INVALID_PLAYER = 42
513
+ LOGGED_IN_OTHER_LOCATION = 43
514
+ SERVER_ID_CONFLICT = 44
515
+ NOT_ALLOWED = 45
516
+ NOT_AUTHENTICATED = 46
517
+ INVALID_TENANT = 47
518
+ UNKNOWN_PACKET = 48
519
+ UNEXPECTED_PACKET = 49
520
+ INVALID_COMMAND_REQUEST_PACKET = 50
521
+ HOST_SUSPENDED = 51
522
+ LOGIN_PACKET_NO_REQUEST = 52
523
+ LOGIN_PACKET_NO_CERT = 53
524
+ MISSING_CLIENT = 54
525
+ KICKED = 55
526
+ KICKED_FOR_EXPLOIT = 56
527
+ KICKED_FOR_IDLE = 57
528
+ RESOURCE_PACK_PROBLEM = 58
529
+ INCOMPATIBLE_PACK = 59
530
+ OUT_OF_STORAGE = 60
531
+ INVALID_LEVEL = 61
532
+ DISCONNECT_PACKET = 62
533
+ BLOCK_MISMATCH = 63
534
+ INVALID_HEIGHTS = 64
535
+ INVALID_WIDTHS = 65
536
+ CONNECTION_LOST = 66
537
+ ZOMBIE_CONNECTION = 67
538
+ SHUTDOWN = 68
539
+ REASON_NOT_SET = 69
540
+ LOADING_STATE_TIMEOUT = 70
541
+ RESOURCE_PACK_LOADING_FAILED = 71
542
+ SEARCHING_FOR_SESSION_LOADING_SCREEN_FAILED = 72
543
+ NETHER_NET_PROTOCOL_VERSION = 73
544
+ SUBSYSTEM_STATUS_ERROR = 74
545
+ EMPTY_AUTH_FROM_DISCOVERY = 75
546
+ EMPTY_URL_FROM_DISCOVERY = 76
547
+ EXPIRED_AUTH_FROM_DISCOVERY = 77
548
+ UNKNOWN_SIGNAL_SERVICE_SIGN_IN_FAILURE = 78
549
+ XBL_JOIN_LOBBY_FAILURE = 79
550
+ UNSPECIFIED_CLIENT_INSTANCE_DISCONNECTION = 80
551
+ NETHER_NET_SESSION_NOT_FOUND = 81
552
+ NETHER_NET_CREATE_PEER_CONNECTION = 82
553
+ NETHER_NET_ICE = 83
554
+ NETHER_NET_CONNECT_REQUEST = 84
555
+ NETHER_NET_CONNECT_RESPONSE = 85
556
+ NETHER_NET_NEGOTIATION_TIMEOUT = 86
557
+ NETHER_NET_INACTIVITY_TIMEOUT = 87
558
+ STALE_CONNECTION_BEING_REPLACED = 88
559
+ REALMS_SESSION_NOT_FOUND = 89
560
+ BAD_PACKET = 90
561
+ NETHER_NET_FAILED_TO_CREATE_OFFER = 91
562
+ NETHER_NET_FAILED_TO_CREATE_ANSWER = 92
563
+ NETHER_NET_FAILED_TO_SET_LOCAL_DESCRIPTION = 93
564
+ NETHER_NET_FAILED_TO_SET_REMOTE_DESCRIPTION = 94
565
+ NETHER_NET_NEGOTIATION_TIMEOUT_WAITING_FOR_RESPONSE = 95
566
+ NETHER_NET_NEGOTIATION_TIMEOUT_WAITING_FOR_ACCEPT = 96
567
+ NETHER_NET_INCOMING_CONNECTION_IGNORED = 97
568
+ NETHER_NET_SIGNALING_PARSING_FAILURE = 98
569
+ NETHER_NET_SIGNALING_UNKNOWN_ERROR = 99
570
+ NETHER_NET_SIGNALING_UNICAST_DELIVERY_FAILED = 100
571
+ NETHER_NET_SIGNALING_BROADCAST_DELIVERY_FAILED = 101
572
+ NETHER_NET_SIGNALING_GENERIC_DELIVERY_FAILED = 102
573
+ EDITOR_MISMATCH_EDITOR_WORLD = 103
574
+ EDITOR_MISMATCH_VANILLA_WORLD = 104
575
+ WORLD_TRANSFER_NOT_PRIMARY_CLIENT = 105
576
+ REQUEST_SERVER_SHUTDOWN = 106
577
+ CLIENT_GAME_SETUP_CANCELLED = 107
578
+ CLIENT_GAME_SETUP_FAILED = 108
579
+ NO_VENUE = 109
580
+ NETHER_NET_SIGNALING_SIGNIN_FAILED = 110
581
+ SESSION_ACCESS_DENIED = 111
582
+ SERVICE_SIGNIN_ISSUE = 112
583
+ NETHER_NET_NO_SIGNALING_CHANNEL = 113
584
+ NETHER_NET_NOT_LOGGED_IN = 114
585
+ NETHER_NET_CLIENT_SIGNALING_ERROR = 115
586
+ SUB_CLIENT_LOGIN_DISABLED = 116
587
+ DEEP_LINK_TRYING_TO_OPEN_DEMO_WORLD_WHILE_SIGNED_IN = 117
588
+ ASYNC_JOIN_TASK_DENIED = 118
589
+ REALMS_TIMELINE_REQUIRED = 119
590
+ GUEST_WITHOUT_HOST = 120
591
+ FAILED_TO_JOIN_EXPERIENCE = 121
592
+ NETHER_NET_DATA_CHANNEL_CLOSED = 122
593
+ DISCOVERY_ENVIRONMENT_MISMATCH = 123
594
+ HOST_WITHOUT_KEYS = 124
595
+ HOST_SIGNED_OUT = 125
596
+ SCRIPT_WATCHDOG_EXCEPTION = 126
597
+ SCRIPT_MEMORY_LIMIT_EXCEEDED = 127
598
+ STORAGE_LOW_DURING_GAMEPLAY = 128
599
+ STORAGE_FULL_DURING_GAMEPLAY = 129
600
+ LEVEL_STORAGE_CORRUPTION = 130
601
+ EDITION_MISMATCH_VANILLA_TO_EDU = 131
602
+ EDITION_MISMATCH_EDU_TO_VANILLA = 132
603
+ EDITOR_MISMATCH_EDITOR_TO_VANILLA = 133
604
+ EDITOR_MISMATCH_VANILLA_TO_EDITOR = 134
605
+ DENY_LISTED = 135
606
+ NONCE_MISSING = 136
607
+ NONCE_NOT_FOUND = 137
608
+ NONCE_EXPIRED = 138
609
+ NONCE_NOT_VALID = 139
610
+ HOST_DISCONNECTED = 140
611
+ EDITOR_JOIN_INTENT_POLICY_FAILURE = 141
612
+ NETHER_NET_IDENTITY_NOT_ALLOWED = 142
613
+ INVALID_NAME = 143
614
+ EXPIRED_TOKEN = 144
615
+ HOST_ACCEPTS_NO_TYPE_OF_AUTH = 145
616
+ NOT_AUTHENTICATED_FAST_FAIL = 146
617
+ EDITOR_NOT_ALLOWED = 147
618
+
619
+ class SocketTeardownPolicy(Enum):
620
+ """
621
+ Policy for tearing down the player's network connection.
622
+ """
623
+ GRACEFUL = 0
624
+ IMMEDIATE_CLOSE = 1
625
+ DROP_CONNECTION = 2
626
+
627
+ @dataclass
628
+ class JavaKickOptions:
629
+ """
630
+ Options for disconnecting a Java Edition player.
631
+ """
632
+ reason: text.TextComponent
633
+ log_to_console: bool
634
+ teardown_policy: SocketTeardownPolicy
635
+
636
+ @dataclass
637
+ class BedrockKickOptions:
638
+ """
639
+ Options for disconnecting a Bedrock Edition player.
640
+ """
641
+ reason: BedrockDisconnectReason
642
+ message: str
643
+ skip_message: bool
644
+ filtered_message: str
645
+ log_to_console: bool
646
+ teardown_policy: SocketTeardownPolicy
647
+
648
+ @dataclass
649
+ class BanPlayerOptions:
650
+ """
651
+ Options for banning a player.
652
+ """
653
+ reason: Optional[text.TextComponent]
654
+ source: Optional[str]
655
+ expires_at_utc: Optional[str]
656
+ duration_seconds: Optional[int]
657
+ kick_if_online: bool
658
+ log_to_console: bool
659
+
660
+ @dataclass
661
+ class BanIpOptions:
662
+ """
663
+ Options for banning an IP address.
664
+ """
665
+ reason: Optional[text.TextComponent]
666
+ source: Optional[str]
667
+ expires_at_utc: Optional[str]
668
+ duration_seconds: Optional[int]
669
+ kick_matching_players: bool
670
+ log_to_console: bool
671
+
672
+ @dataclass
673
+ class JavaResourcePack:
674
+ """
675
+ Represents a resource pack sent to a Java Edition player.
676
+ """
677
+ id: uuid.Uuid
678
+ url: str
679
+ hash: str
680
+ forced: bool
681
+ prompt_message: Optional[text.TextComponent]
682
+
683
+ class JavaPlayer:
684
+ """
685
+ A handle to a player connected via the Java Edition.
686
+ """
687
+
688
+ def get_version(self) -> JavaMinecraftVersion:
689
+ """
690
+ Returns the Minecraft Java Edition version of the player.
691
+ """
692
+ raise NotImplementedError
693
+ def get_brand(self) -> str:
694
+ """
695
+ Returns the brand of the player's client (e.g., \"vanilla\", \"fabric\").
696
+ """
697
+ raise NotImplementedError
698
+ def get_server_address(self) -> str:
699
+ """
700
+ Returns the server address the player used to connect.
701
+ """
702
+ raise NotImplementedError
703
+ def get_settings(self) -> JavaPlayerSettings:
704
+ """
705
+ Returns the player's configuration settings.
706
+ """
707
+ raise NotImplementedError
708
+ def send_packet(self, packet: java_packets.ClientboundPacket) -> None:
709
+ """
710
+ Sends a Java-specific clientbound packet to the player.
711
+ """
712
+ raise NotImplementedError
713
+ def send_custom_payload(self, channel: str, data: bytes) -> None:
714
+ """
715
+ Sends a custom payload packet (plugin message) to the player.
716
+ """
717
+ raise NotImplementedError
718
+ def show_dialog(self, dialog: java_dialogs.Dialog) -> None:
719
+ """
720
+ Shows a dialog to the player.
721
+ """
722
+ raise NotImplementedError
723
+ def clear_dialog(self) -> None:
724
+ """
725
+ Clears any currently shown dialog for the player.
726
+ """
727
+ raise NotImplementedError
728
+ def get_scoreboard(self) -> scoreboard.Scoreboard:
729
+ """
730
+ Returns the Java scoreboard handle for this player.
731
+ """
732
+ raise NotImplementedError
733
+ def reset_scoreboard(self) -> None:
734
+ """
735
+ Resets the player's custom Java scoreboard back to the world scoreboard.
736
+ """
737
+ raise NotImplementedError
738
+ def send_resource_pack(self, pack: JavaResourcePack) -> None:
739
+ """
740
+ Sends a resource pack to the Java player.
741
+ """
742
+ raise NotImplementedError
743
+ def remove_resource_pack(self, id: uuid.Uuid) -> None:
744
+ """
745
+ Removes a specific resource pack by UUID for the Java player.
746
+ """
747
+ raise NotImplementedError
748
+ def clear_resource_packs(self) -> None:
749
+ """
750
+ Clears all custom resource packs for the Java player.
751
+ """
752
+ raise NotImplementedError
753
+ def kick(self, options: JavaKickOptions) -> None:
754
+ """
755
+ Kicks the Java player with the specified options.
756
+ """
757
+ raise NotImplementedError
758
+ def send_game_event(self, event: ClientGameEvent, value: float) -> None:
759
+ """
760
+ Sends a clientbound GameEvent packet to the Java player.
761
+ """
762
+ raise NotImplementedError
763
+ def send_entity_status(self, entity_id: int, status: entity_statuses.EntityStatus) -> None:
764
+ """
765
+ Sends an entity status / animation event packet to the Java player for a specific entity ID.
766
+ """
767
+ raise NotImplementedError
768
+ def __enter__(self) -> Self:
769
+ """Returns self"""
770
+ return self
771
+
772
+ def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> bool | None:
773
+ """
774
+ Release this resource.
775
+ """
776
+ raise NotImplementedError
777
+
778
+
779
+ @dataclass
780
+ class BedrockResourcePackEntry:
781
+ """
782
+ Represents an individual Bedrock Edition resource pack entry.
783
+ """
784
+ id: uuid.Uuid
785
+ version: str
786
+ size: int
787
+ download_url: str
788
+ content_key: Optional[str]
789
+ sub_pack_name: Optional[str]
790
+ content_id: Optional[str]
791
+ has_scripts: bool
792
+ addon_pack: bool
793
+ rtx_enabled: bool
794
+
795
+ @dataclass
796
+ class BedrockResourcePacksInfo:
797
+ """
798
+ Represents the resource packs information payload sent to Bedrock clients.
799
+ """
800
+ required: bool
801
+ has_addon_packs: bool
802
+ has_scripts: bool
803
+ is_vibrant_visuals_force_disabled: bool
804
+ world_template_id: Optional[uuid.Uuid]
805
+ world_template_version: Optional[str]
806
+ packs: List[BedrockResourcePackEntry]
807
+
808
+ class BedrockPlayer:
809
+ """
810
+ A handle to a player connected via the Bedrock Edition.
811
+ """
812
+
813
+ def get_version(self) -> BedrockMinecraftVersion:
814
+ """
815
+ Returns the Minecraft Bedrock Edition version of the player.
816
+ """
817
+ raise NotImplementedError
818
+ def get_settings(self) -> BedrockPlayerSettings:
819
+ """
820
+ Returns the player's configuration settings.
821
+ """
822
+ raise NotImplementedError
823
+ def get_ability(self, ability: BedrockAbility) -> bool:
824
+ """
825
+ Returns whether a specific Bedrock-only ability is enabled for the player.
826
+ """
827
+ raise NotImplementedError
828
+ def set_ability(self, ability: BedrockAbility, value: bool) -> None:
829
+ """
830
+ Sets whether a specific Bedrock-only ability is enabled for the player.
831
+ """
832
+ raise NotImplementedError
833
+ def get_status_flag(self, flag: BedrockStatusFlag) -> bool:
834
+ """
835
+ Returns whether a specific Bedrock-only status flag is enabled for the player.
836
+
837
+ Status flags control things like whether the player is on fire, sneaking,
838
+ sprinting, or has specific visual effects.
839
+ """
840
+ raise NotImplementedError
841
+ def set_status_flag(self, flag: BedrockStatusFlag, value: bool) -> None:
842
+ """
843
+ Sets whether a specific Bedrock-only status flag is enabled for the player.
844
+
845
+ This can be used to manually trigger client-side visual states.
846
+ """
847
+ raise NotImplementedError
848
+ def send_packet(self, packet: bedrock_packets.ClientboundPacket) -> None:
849
+ """
850
+ Sends a Bedrock-specific clientbound packet to the player.
851
+ """
852
+ raise NotImplementedError
853
+ def open_form(self, form: forms.Form) -> int:
854
+ """
855
+ Opens a Bedrock custom form for the player.
856
+ """
857
+ raise NotImplementedError
858
+ def get_scoreboard(self) -> scoreboard.BedrockScoreboard:
859
+ """
860
+ Returns the Bedrock scoreboard handle for this player.
861
+ """
862
+ raise NotImplementedError
863
+ def reset_scoreboard(self) -> None:
864
+ """
865
+ Resets the player's custom Bedrock scoreboard back to the world scoreboard.
866
+ """
867
+ raise NotImplementedError
868
+ def send_resource_packs_info(self, info: BedrockResourcePacksInfo) -> None:
869
+ """
870
+ Sends resource packs information to the Bedrock player.
871
+ """
872
+ raise NotImplementedError
873
+ def kick(self, options: BedrockKickOptions) -> None:
874
+ """
875
+ Kicks the Bedrock player with the specified options.
876
+ """
877
+ raise NotImplementedError
878
+ def __enter__(self) -> Self:
879
+ """Returns self"""
880
+ return self
881
+
882
+ def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> bool | None:
883
+ """
884
+ Release this resource.
885
+ """
886
+ raise NotImplementedError
887
+
888
+
889
+ class Player:
890
+ """
891
+ A handle to a player on the server.
892
+ """
893
+
894
+ def as_entity(self) -> world.Entity:
895
+ """
896
+ Returns the player as an entity.
897
+ """
898
+ raise NotImplementedError
899
+ def get_id(self) -> uuid.Uuid:
900
+ """
901
+ Returns the player's unique UUID as a string.
902
+ """
903
+ raise NotImplementedError
904
+ def get_name(self) -> str:
905
+ """
906
+ Returns the player's username.
907
+ """
908
+ raise NotImplementedError
909
+ def get_position(self) -> Tuple[float, float, float]:
910
+ """
911
+ Basic state
912
+ Returns the player's current position in the world.
913
+ """
914
+ raise NotImplementedError
915
+ def get_yaw(self) -> float:
916
+ """
917
+ Returns the player's current yaw (horizontal rotation).
918
+ """
919
+ raise NotImplementedError
920
+ def get_pitch(self) -> float:
921
+ """
922
+ Returns the player's current pitch (vertical rotation).
923
+ """
924
+ raise NotImplementedError
925
+ def get_world(self) -> world.World:
926
+ """
927
+ Returns the world the player is currently in.
928
+ """
929
+ raise NotImplementedError
930
+ def get_gamemode(self) -> common.GameMode:
931
+ """
932
+ Returns the player's current game mode.
933
+ """
934
+ raise NotImplementedError
935
+ def set_gamemode(self, mode: common.GameMode) -> bool:
936
+ """
937
+ Changes the player's game mode. Returns true if successful.
938
+ """
939
+ raise NotImplementedError
940
+ def get_locale(self) -> str:
941
+ """
942
+ Returns the player's locale (e.g., \"en_us\").
943
+ """
944
+ raise NotImplementedError
945
+ def get_ping(self) -> int:
946
+ """
947
+ Returns the player's current ping in milliseconds.
948
+ """
949
+ raise NotImplementedError
950
+ def get_permission_level(self) -> permission.PermissionLevel:
951
+ """
952
+ Permissions & metadata
953
+ Returns the player's permission level (0-4).
954
+ """
955
+ raise NotImplementedError
956
+ def set_permission_level(self, level: permission.PermissionLevel) -> None:
957
+ """
958
+ Sets the player's permission level.
959
+ """
960
+ raise NotImplementedError
961
+ def set_permission(self, node: str, value: bool) -> None:
962
+ """
963
+ Grants or denies a specific permission node for the player.
964
+ """
965
+ raise NotImplementedError
966
+ def unset_permission(self, node: str) -> None:
967
+ """
968
+ Removes an explicitly set permission node from the player.
969
+ """
970
+ raise NotImplementedError
971
+ def has_permission_set(self, node: str) -> Optional[bool]:
972
+ """
973
+ Returns `Some(true)` if granted, `Some(false)` if denied, or `None` if not set.
974
+ """
975
+ raise NotImplementedError
976
+ def has_permission(self, node: str) -> bool:
977
+ """
978
+ Checks if the player has a specific permission node.
979
+ """
980
+ raise NotImplementedError
981
+ def get_display_name(self) -> text.TextComponent:
982
+ """
983
+ Returns the player's display name, which may include formatting.
984
+ """
985
+ raise NotImplementedError
986
+ def set_display_name(self, display_name: text.TextComponent) -> None:
987
+ """
988
+ Sets the player's display name.
989
+ """
990
+ raise NotImplementedError
991
+ def get_tab_list_name(self) -> Optional[text.TextComponent]:
992
+ """
993
+ Gets the player's custom tab list name.
994
+ """
995
+ raise NotImplementedError
996
+ def set_tab_list_name(self, name: Optional[text.TextComponent]) -> None:
997
+ """
998
+ Sets the player's custom tab list name.
999
+ """
1000
+ raise NotImplementedError
1001
+ def send_system_message(self, text: text.TextComponent, overlay: bool) -> None:
1002
+ """
1003
+ Messaging & titles
1004
+ Sends a system message to the player's chat.
1005
+ """
1006
+ raise NotImplementedError
1007
+ def delete_message_by_signature(self, signature: bytes) -> None:
1008
+ """
1009
+ Deletes a signed chat message from the player's chat window using its 256-byte signature.
1010
+ """
1011
+ raise NotImplementedError
1012
+ def delete_message_by_id(self, signature_id: int) -> None:
1013
+ """
1014
+ Deletes a signed chat message from the player's chat window using its signature cache ID.
1015
+ """
1016
+ raise NotImplementedError
1017
+ def set_tab_list_header_footer(self, header: text.TextComponent, footer: text.TextComponent) -> None:
1018
+ """
1019
+ Sets the header and footer of the player's Tab list.
1020
+ """
1021
+ raise NotImplementedError
1022
+ def set_tab_list_order(self, order: int) -> None:
1023
+ """
1024
+ Sets the sorting order of the player in the Tab list.
1025
+ """
1026
+ raise NotImplementedError
1027
+ def set_tab_list_latency(self, latency: int) -> None:
1028
+ """
1029
+ Sets the latency (ping) shown for the player in the Tab list.
1030
+ """
1031
+ raise NotImplementedError
1032
+ def set_tab_list_listed(self, listed: bool) -> None:
1033
+ """
1034
+ Sets whether the player is visible in the Tab list.
1035
+ """
1036
+ raise NotImplementedError
1037
+ def show_title(self, text: text.TextComponent) -> None:
1038
+ """
1039
+ Shows a large title on the player's screen.
1040
+ """
1041
+ raise NotImplementedError
1042
+ def show_subtitle(self, text: text.TextComponent) -> None:
1043
+ """
1044
+ Shows a smaller subtitle on the player's screen.
1045
+ """
1046
+ raise NotImplementedError
1047
+ def show_actionbar(self, text: text.TextComponent) -> None:
1048
+ """
1049
+ Shows a message in the action bar area.
1050
+ """
1051
+ raise NotImplementedError
1052
+ def send_title_animation(self, fade_in: int, stay: int, fade_out: int) -> None:
1053
+ """
1054
+ Sets the fade-in, stay, and fade-out times for titles.
1055
+ """
1056
+ raise NotImplementedError
1057
+ def set_camera(self, entity: Optional[world.Entity]) -> None:
1058
+ """
1059
+ Camera & Spectating
1060
+ Sets the player's camera to view from the perspective of another entity.
1061
+ If `entity` is `none`, the camera is reset back to the player.
1062
+ """
1063
+ raise NotImplementedError
1064
+ def set_camera_entity_id(self, entity_id: int) -> None:
1065
+ """
1066
+ Sets the player's camera to view from the perspective of an entity with the given entity ID.
1067
+ If `entity-id` is the player's own entity ID, the camera is reset back to the player.
1068
+ """
1069
+ raise NotImplementedError
1070
+ def get_camera_entity_id(self) -> int:
1071
+ """
1072
+ Gets the entity ID of the entity that the player's camera is currently attached to,
1073
+ or the player's own entity ID if the camera has not been overridden.
1074
+ """
1075
+ raise NotImplementedError
1076
+ def reset_camera(self) -> None:
1077
+ """
1078
+ Resets the player's camera back to their own perspective.
1079
+ """
1080
+ raise NotImplementedError
1081
+ def play_sound(self, sound: sounds.Sound, category: sounds.SoundCategory, volume: float, pitch: float) -> None:
1082
+ """
1083
+ Audio & Particles
1084
+ Plays a sound effect for this player at their current location.
1085
+ """
1086
+ raise NotImplementedError
1087
+ def play_sound_at(self, pos: Tuple[float, float, float], sound: sounds.Sound, category: sounds.SoundCategory, volume: float, pitch: float) -> None:
1088
+ """
1089
+ Plays a sound effect for this player at a specific location.
1090
+ """
1091
+ raise NotImplementedError
1092
+ def stop_sound(self, sound: Optional[sounds.Sound], category: Optional[sounds.SoundCategory]) -> None:
1093
+ """
1094
+ Stops a sound effect from playing for this player.
1095
+ """
1096
+ raise NotImplementedError
1097
+ def play_custom_sound(self, sound_name: str, category: sounds.SoundCategory, volume: float, pitch: float) -> None:
1098
+ """
1099
+ Plays a custom resource pack sound identifier for this player at their current location.
1100
+ """
1101
+ raise NotImplementedError
1102
+ def play_custom_sound_at(self, pos: Tuple[float, float, float], sound_name: str, category: sounds.SoundCategory, volume: float, pitch: float) -> None:
1103
+ """
1104
+ Plays a custom resource pack sound identifier for this player at a specific location.
1105
+ """
1106
+ raise NotImplementedError
1107
+ def stop_custom_sound(self, sound_name: Optional[str], category: Optional[sounds.SoundCategory]) -> None:
1108
+ """
1109
+ Stops a custom sound identifier from playing for this player.
1110
+ """
1111
+ raise NotImplementedError
1112
+ def spawn_particles(self, particle: particles.Particle, pos: Tuple[float, float, float], count: int, offset: Tuple[float, float, float], max_speed: float) -> None:
1113
+ """
1114
+ Spawns particles visible only to this player.
1115
+ """
1116
+ raise NotImplementedError
1117
+ def send_block_change(self, pos: common.BlockPos, block_id: int) -> None:
1118
+ """
1119
+ Visuals & Client Overrides
1120
+ Sends a temporary fake block change to the player's client without modifying the server world.
1121
+ """
1122
+ raise NotImplementedError
1123
+ def reset_block_change(self, pos: common.BlockPos) -> None:
1124
+ """
1125
+ Resets a temporary fake block change by resending the actual world block at that position.
1126
+ """
1127
+ raise NotImplementedError
1128
+ def send_hurt_animation(self, yaw: float) -> None:
1129
+ """
1130
+ Sends a hurt / damage-tilt animation to the player's client (causes screen shake in the given yaw direction).
1131
+ """
1132
+ raise NotImplementedError
1133
+ def open_book(self, hand: common.Hand) -> None:
1134
+ """
1135
+ Opens a written book interface for the player from the specified hand.
1136
+ """
1137
+ raise NotImplementedError
1138
+ def open_sign_editor(self, pos: common.BlockPos, is_front_text: bool) -> None:
1139
+ """
1140
+ Forces the sign text editor to open for the player at the specified sign block position.
1141
+ """
1142
+ raise NotImplementedError
1143
+ def set_velocity(self, velocity: Tuple[float, float, float]) -> None:
1144
+ """
1145
+ Velocity & Physics
1146
+ Sets the player's velocity / motion vector.
1147
+ """
1148
+ raise NotImplementedError
1149
+ def apply_knockback(self, strength: float, x: float, z: float) -> None:
1150
+ """
1151
+ Applies directional knockback impulse to the player.
1152
+ """
1153
+ raise NotImplementedError
1154
+ def set_movement_locked(self, locked: bool) -> None:
1155
+ """
1156
+ Movement Lock & Freezing
1157
+ Sets whether the player's movement is locked (frozen in place) for cutscenes and NPC dialogues.
1158
+ """
1159
+ raise NotImplementedError
1160
+ def is_movement_locked(self) -> bool:
1161
+ """
1162
+ Returns whether the player's movement is currently locked.
1163
+ """
1164
+ raise NotImplementedError
1165
+ def set_freeze_ticks(self, ticks: int) -> None:
1166
+ """
1167
+ Sets the number of freeze ticks on the player (controlling the powdered snow / frostbite screen vignette).
1168
+ """
1169
+ raise NotImplementedError
1170
+ def get_freeze_ticks(self) -> int:
1171
+ """
1172
+ Returns the current number of freeze ticks on the player.
1173
+ """
1174
+ raise NotImplementedError
1175
+ def set_server_links(self, links: List[ServerLink]) -> None:
1176
+ """
1177
+ Sends custom server links to the player (displayed in the client Esc pause menu in 1.21+).
1178
+ """
1179
+ raise NotImplementedError
1180
+ def teleport(self, position: Tuple[float, float, float], yaw: Optional[float], pitch: Optional[float], world: world.World) -> None:
1181
+ """
1182
+ Teleport & kick
1183
+ Teleports the player to a position in a world.
1184
+ """
1185
+ raise NotImplementedError
1186
+ def teleport_world(self, world_ref: world.World, position: Tuple[float, float, float], yaw: Optional[float], pitch: Optional[float]) -> None:
1187
+ """
1188
+ Teleports the player to another world at a specific position.
1189
+ """
1190
+ raise NotImplementedError
1191
+ def respawn(self) -> None:
1192
+ """
1193
+ Forces the player to respawn.
1194
+ """
1195
+ raise NotImplementedError
1196
+ def open_gui(self, gui_ref: gui.Gui) -> None:
1197
+ """
1198
+ Opens a GUI for the player.
1199
+ """
1200
+ raise NotImplementedError
1201
+ def ban(self, options: BanPlayerOptions) -> None:
1202
+ """
1203
+ Bans the player with the specified options.
1204
+ """
1205
+ raise NotImplementedError
1206
+ def ban_ip(self, options: BanIpOptions) -> None:
1207
+ """
1208
+ Bans the player's IP address with the specified options.
1209
+ """
1210
+ raise NotImplementedError
1211
+ def transfer(self, host: str, port: int) -> None:
1212
+ """
1213
+ Transfers the player to another server.
1214
+ """
1215
+ raise NotImplementedError
1216
+ def add_effect(self, effect: status_effect.StatusEffectInstance) -> None:
1217
+ """
1218
+ Status Effects
1219
+ Gives a status effect to the player.
1220
+ """
1221
+ raise NotImplementedError
1222
+ def remove_effect(self, effect: status_effect.StatusEffectType) -> None:
1223
+ """
1224
+ Removes a status effect from the player.
1225
+ """
1226
+ raise NotImplementedError
1227
+ def clear_effects(self) -> None:
1228
+ """
1229
+ Clears all active status effects from the player.
1230
+ """
1231
+ raise NotImplementedError
1232
+ def has_effect(self, effect: status_effect.StatusEffectType) -> bool:
1233
+ """
1234
+ Checks if a status effect is currently applied to the player.
1235
+ """
1236
+ raise NotImplementedError
1237
+ def get_effect(self, effect: status_effect.StatusEffectType) -> Optional[status_effect.StatusEffectInstance]:
1238
+ """
1239
+ Returns the status effect instance applied to the player, if any.
1240
+ """
1241
+ raise NotImplementedError
1242
+ def get_active_effects(self) -> List[status_effect.StatusEffectInstance]:
1243
+ """
1244
+ Returns all status effects currently applied to the player.
1245
+ """
1246
+ raise NotImplementedError
1247
+ def heal(self, amount: float) -> None:
1248
+ """
1249
+ Health & Damage
1250
+ Heals the player by a specified amount.
1251
+ """
1252
+ raise NotImplementedError
1253
+ def damage(self, amount: float, damage_type: damage_types.DamageType) -> None:
1254
+ """
1255
+ Deals damage to the player by a specified amount with a damage type.
1256
+ """
1257
+ raise NotImplementedError
1258
+ def kill(self) -> None:
1259
+ """
1260
+ Kills the player instantly.
1261
+ """
1262
+ raise NotImplementedError
1263
+ def get_statistic(self, category: statistics.StatisticCategory, stat_id: int) -> int:
1264
+ """
1265
+ Statistics
1266
+ Gets the value of a statistic for this player in the given category and ID.
1267
+ """
1268
+ raise NotImplementedError
1269
+ def set_statistic(self, category: statistics.StatisticCategory, stat_id: int, value: int) -> None:
1270
+ """
1271
+ Sets the value of a statistic for this player in the given category and ID.
1272
+ """
1273
+ raise NotImplementedError
1274
+ def increment_statistic(self, category: statistics.StatisticCategory, stat_id: int, amount: int) -> None:
1275
+ """
1276
+ Increments the value of a statistic for this player in the given category and ID.
1277
+ """
1278
+ raise NotImplementedError
1279
+ def get_custom_statistic(self, stat: statistics.CustomStatistic) -> int:
1280
+ """
1281
+ Gets the value of a custom statistic for this player.
1282
+ """
1283
+ raise NotImplementedError
1284
+ def set_custom_statistic(self, stat: statistics.CustomStatistic, value: int) -> None:
1285
+ """
1286
+ Sets the value of a custom statistic for this player.
1287
+ """
1288
+ raise NotImplementedError
1289
+ def increment_custom_statistic(self, stat: statistics.CustomStatistic, amount: int) -> None:
1290
+ """
1291
+ Increments the value of a custom statistic for this player.
1292
+ """
1293
+ raise NotImplementedError
1294
+ def send_stats(self) -> None:
1295
+ """
1296
+ Sends the player's updated statistics packet to the client.
1297
+ """
1298
+ raise NotImplementedError
1299
+ def get_team(self) -> Optional[str]:
1300
+ """
1301
+ Gets the team name that this player belongs to on their active scoreboard, if any.
1302
+ """
1303
+ raise NotImplementedError
1304
+ def start_cooldown(self, group: str, duration_ticks: int) -> None:
1305
+ """
1306
+ Cooldowns
1307
+ Starts an item cooldown for a specific item group name.
1308
+ """
1309
+ raise NotImplementedError
1310
+ def get_cooldown(self, group: str) -> float:
1311
+ """
1312
+ Returns the cooldown progress (0.0 to 1.0) for a specific item group.
1313
+ """
1314
+ raise NotImplementedError
1315
+ def is_on_cooldown(self, group: str) -> bool:
1316
+ """
1317
+ Checks if a specific item group is currently on cooldown.
1318
+ """
1319
+ raise NotImplementedError
1320
+ def set_allow_flight(self, allowed: bool) -> None:
1321
+ """
1322
+ Abilities & Flight
1323
+ Sets whether the player is allowed to fly.
1324
+ """
1325
+ raise NotImplementedError
1326
+ def set_fly_speed(self, speed: float) -> None:
1327
+ """
1328
+ Sets the player's flying speed.
1329
+ """
1330
+ raise NotImplementedError
1331
+ def set_walk_speed(self, speed: float) -> None:
1332
+ """
1333
+ Sets the player's walking speed.
1334
+ """
1335
+ raise NotImplementedError
1336
+ def set_invulnerable(self, invulnerable: bool) -> None:
1337
+ """
1338
+ Sets whether the player is invulnerable to damage.
1339
+ """
1340
+ raise NotImplementedError
1341
+ def get_inventory(self) -> inventory.PlayerInventory:
1342
+ """
1343
+ Inventory
1344
+ Returns the player's inventory handle for managing main storage, armor, and equipment.
1345
+ """
1346
+ raise NotImplementedError
1347
+ def get_ender_chest(self) -> inventory.Inventory:
1348
+ """
1349
+ Returns the player's ender chest inventory handle.
1350
+ """
1351
+ raise NotImplementedError
1352
+ def get_selected_slot(self) -> int:
1353
+ """
1354
+ Returns the index of the currently selected hotbar slot (0-8).
1355
+ """
1356
+ raise NotImplementedError
1357
+ def get_item_in_hand(self, hand: common.Hand) -> Optional[item_stack.ItemStack]:
1358
+ """
1359
+ Returns the item currently in the specified hand.
1360
+ """
1361
+ raise NotImplementedError
1362
+ def get_inventory_item(self, slot: int) -> Optional[item_stack.ItemStack]:
1363
+ """
1364
+ Returns the item in the specified inventory slot.
1365
+ """
1366
+ raise NotImplementedError
1367
+ def set_item_in_hand(self, hand: common.Hand, stack: Optional[item_stack.ItemStack]) -> None:
1368
+ """
1369
+ Sets the item in the specified hand.
1370
+ """
1371
+ raise NotImplementedError
1372
+ def set_inventory_item(self, slot: int, stack: Optional[item_stack.ItemStack]) -> None:
1373
+ """
1374
+ Sets the item in the specified inventory slot.
1375
+ """
1376
+ raise NotImplementedError
1377
+ def get_ender_chest_item(self, slot: int) -> Optional[item_stack.ItemStack]:
1378
+ """
1379
+ Ender Chest Inventory
1380
+ Returns the item in the specified ender chest slot (0-26).
1381
+ """
1382
+ raise NotImplementedError
1383
+ def set_ender_chest_item(self, slot: int, stack: Optional[item_stack.ItemStack]) -> None:
1384
+ """
1385
+ Sets the item in the specified ender chest slot (0-26).
1386
+ """
1387
+ raise NotImplementedError
1388
+ def clear_ender_chest(self) -> None:
1389
+ """
1390
+ Clears all items from the player's ender chest.
1391
+ """
1392
+ raise NotImplementedError
1393
+ def open_ender_chest(self) -> None:
1394
+ """
1395
+ Opens the player's ender chest inventory screen for them.
1396
+ """
1397
+ raise NotImplementedError
1398
+ def get_health(self) -> float:
1399
+ """
1400
+ Status
1401
+ Returns the player's current health.
1402
+ """
1403
+ raise NotImplementedError
1404
+ def set_health(self, health: float) -> None:
1405
+ """
1406
+ Sets the player's current health.
1407
+ """
1408
+ raise NotImplementedError
1409
+ def get_max_health(self) -> float:
1410
+ """
1411
+ Returns the player's maximum health.
1412
+ """
1413
+ raise NotImplementedError
1414
+ def set_max_health(self, max_health: float) -> None:
1415
+ """
1416
+ Sets the player's maximum health.
1417
+ """
1418
+ raise NotImplementedError
1419
+ def get_food_level(self) -> int:
1420
+ """
1421
+ Returns the player's food level (0-20).
1422
+ """
1423
+ raise NotImplementedError
1424
+ def set_food_level(self, food_level: int) -> None:
1425
+ """
1426
+ Sets the player's food level.
1427
+ """
1428
+ raise NotImplementedError
1429
+ def get_saturation(self) -> float:
1430
+ """
1431
+ Returns the player's food saturation level.
1432
+ """
1433
+ raise NotImplementedError
1434
+ def set_saturation(self, saturation: float) -> None:
1435
+ """
1436
+ Sets the player's food saturation level.
1437
+ """
1438
+ raise NotImplementedError
1439
+ def get_exhaustion(self) -> float:
1440
+ """
1441
+ Returns the player's food exhaustion level.
1442
+ """
1443
+ raise NotImplementedError
1444
+ def set_exhaustion(self, exhaustion: float) -> None:
1445
+ """
1446
+ Sets the player's food exhaustion level.
1447
+ """
1448
+ raise NotImplementedError
1449
+ def get_absorption(self) -> float:
1450
+ """
1451
+ Returns the player's current absorption amount.
1452
+ """
1453
+ raise NotImplementedError
1454
+ def set_absorption(self, absorption: float) -> None:
1455
+ """
1456
+ Sets the player's current absorption amount.
1457
+ """
1458
+ raise NotImplementedError
1459
+ def get_experience_level(self) -> int:
1460
+ """
1461
+ Returns the player's total experience level.
1462
+ """
1463
+ raise NotImplementedError
1464
+ def get_experience_progress(self) -> float:
1465
+ """
1466
+ Returns the player's progress toward the next level (0.0 to 1.0).
1467
+ """
1468
+ raise NotImplementedError
1469
+ def get_experience_points(self) -> int:
1470
+ """
1471
+ Returns the total experience points the player has.
1472
+ """
1473
+ raise NotImplementedError
1474
+ def set_experience_level(self, level: int) -> None:
1475
+ """
1476
+ Sets the player's total experience level.
1477
+ """
1478
+ raise NotImplementedError
1479
+ def set_experience_progress(self, progress: float) -> None:
1480
+ """
1481
+ Sets the player's progress toward the next level.
1482
+ """
1483
+ raise NotImplementedError
1484
+ def set_experience_points(self, points: int) -> None:
1485
+ """
1486
+ Sets the player's total experience points.
1487
+ """
1488
+ raise NotImplementedError
1489
+ def add_experience_levels(self, levels: int) -> None:
1490
+ """
1491
+ Adds experience levels to the player.
1492
+ """
1493
+ raise NotImplementedError
1494
+ def add_experience_points(self, points: int) -> None:
1495
+ """
1496
+ Adds experience points to the player.
1497
+ """
1498
+ raise NotImplementedError
1499
+ def is_flying(self) -> bool:
1500
+ """
1501
+ Returns whether the player is currently flying.
1502
+ """
1503
+ raise NotImplementedError
1504
+ def set_flying(self, flying: bool) -> None:
1505
+ """
1506
+ Sets whether the player should be flying.
1507
+ """
1508
+ raise NotImplementedError
1509
+ def get_abilities(self) -> PlayerAbilities:
1510
+ """
1511
+ Returns the player's current abilities.
1512
+ """
1513
+ raise NotImplementedError
1514
+ def set_abilities(self, abilities: PlayerAbilities) -> None:
1515
+ """
1516
+ Updates the player's abilities.
1517
+ """
1518
+ raise NotImplementedError
1519
+ def get_ip(self) -> str:
1520
+ """
1521
+ Returns the player's IP address.
1522
+ """
1523
+ raise NotImplementedError
1524
+ def get_skin(self) -> Optional[PlayerSkin]:
1525
+ """
1526
+ Returns the player's current skin textures.
1527
+ """
1528
+ raise NotImplementedError
1529
+ def set_skin(self, skin: PlayerSkin) -> None:
1530
+ """
1531
+ Updates the player's skin textures.
1532
+ Note: this only updates the fields, it doesn't reload the skin.
1533
+ """
1534
+ raise NotImplementedError
1535
+ def get_skin_parts(self) -> SkinParts:
1536
+ """
1537
+ Returns which skin parts are visible.
1538
+ """
1539
+ raise NotImplementedError
1540
+ def set_skin_parts(self, parts: SkinParts) -> None:
1541
+ """
1542
+ Sets which skin parts are visible.
1543
+ """
1544
+ raise NotImplementedError
1545
+ def set_player_time(self, time: int, relative: bool) -> None:
1546
+ """
1547
+ Per-Player Environment & Overrides
1548
+ Overrides the time of day shown to this player.
1549
+ """
1550
+ raise NotImplementedError
1551
+ def reset_player_time(self) -> None:
1552
+ """
1553
+ Resets the player's time to sync with the server world time.
1554
+ """
1555
+ raise NotImplementedError
1556
+ def get_player_time(self) -> Optional[int]:
1557
+ """
1558
+ Returns the custom time set for this player, if any.
1559
+ """
1560
+ raise NotImplementedError
1561
+ def is_player_time_relative(self) -> bool:
1562
+ """
1563
+ Checks if the custom player time is relative to the world time.
1564
+ """
1565
+ raise NotImplementedError
1566
+ def set_player_weather(self, weather: PlayerWeather) -> None:
1567
+ """
1568
+ Overrides the weather condition shown to this player.
1569
+ """
1570
+ raise NotImplementedError
1571
+ def reset_player_weather(self) -> None:
1572
+ """
1573
+ Resets the player's weather to match the server world weather.
1574
+ """
1575
+ raise NotImplementedError
1576
+ def get_player_weather(self) -> Optional[PlayerWeather]:
1577
+ """
1578
+ Returns the custom weather set for this player, if any.
1579
+ """
1580
+ raise NotImplementedError
1581
+ def set_compass_target(self, pos: Tuple[float, float, float]) -> None:
1582
+ """
1583
+ Sets the position where the player's compass points.
1584
+ """
1585
+ raise NotImplementedError
1586
+ def get_compass_target(self) -> Tuple[float, float, float]:
1587
+ """
1588
+ Returns the position where the player's compass currently points.
1589
+ """
1590
+ raise NotImplementedError
1591
+ def set_respawn_location(self, pos: Tuple[float, float, float]) -> None:
1592
+ """
1593
+ Sets the player's custom respawn / bed location.
1594
+ """
1595
+ raise NotImplementedError
1596
+ def get_respawn_location(self) -> Optional[Tuple[float, float, float]]:
1597
+ """
1598
+ Returns the player's custom respawn / bed location, if set.
1599
+ """
1600
+ raise NotImplementedError
1601
+ def hide_player(self, other: Self) -> None:
1602
+ """
1603
+ Hides another player from this player's view (vanish).
1604
+ """
1605
+ raise NotImplementedError
1606
+ def show_player(self, other: Self) -> None:
1607
+ """
1608
+ Shows a previously hidden player to this player.
1609
+ """
1610
+ raise NotImplementedError
1611
+ def can_see(self, other: Self) -> bool:
1612
+ """
1613
+ Checks if this player can see another specified player.
1614
+ """
1615
+ raise NotImplementedError
1616
+ def can_see_player(self, other: Self) -> bool:
1617
+ """
1618
+ Checks if this player can see another specified player.
1619
+ """
1620
+ raise NotImplementedError
1621
+ def set_tab_list_ping(self, latency_ms: int) -> None:
1622
+ """
1623
+ Sets the tab list ping / latency indicator in milliseconds.
1624
+ """
1625
+ raise NotImplementedError
1626
+ def set_item_cooldown(self, item_id: str, ticks: int) -> None:
1627
+ """
1628
+ Sets a client-side item cooldown overlay.
1629
+ """
1630
+ raise NotImplementedError
1631
+ def get_item_cooldown(self, item_id: str) -> Optional[int]:
1632
+ """
1633
+ Returns the remaining cooldown ticks for an item, if active.
1634
+ """
1635
+ raise NotImplementedError
1636
+ def has_item_cooldown(self, item_id: str) -> bool:
1637
+ """
1638
+ Checks if an item is currently on cooldown.
1639
+ """
1640
+ raise NotImplementedError
1641
+ def ray_trace_block(self, max_distance: float, include_fluids: bool) -> Optional[world.RayTraceBlockResult]:
1642
+ """
1643
+ Performs a ray-trace from the player's eye position in looking direction to find the targeted block.
1644
+ """
1645
+ raise NotImplementedError
1646
+ def ray_trace_entity(self, max_distance: float) -> Optional[world.RayTraceEntityResult]:
1647
+ """
1648
+ Performs a ray-trace from the player's eye position in looking direction to find the targeted entity.
1649
+ """
1650
+ raise NotImplementedError
1651
+ def get_target_entity(self, max_distance: float) -> Optional[world.Entity]:
1652
+ """
1653
+ Returns the entity currently targeted in the looking direction within the specified distance.
1654
+ """
1655
+ raise NotImplementedError
1656
+ def get_target_block(self, max_distance: int) -> Optional[Tuple[float, float, float]]:
1657
+ """
1658
+ Raycasts from the player's eyes to find the block being targeted.
1659
+ """
1660
+ raise NotImplementedError
1661
+ def get_target_block_exact(self, max_distance: float, include_fluids: bool) -> Optional[world.RayTraceBlockResult]:
1662
+ """
1663
+ Performs a raycast from the player's eyes to find the exact block and face being targeted.
1664
+ """
1665
+ raise NotImplementedError
1666
+ def launch_projectile(self, type: ProjectileType) -> Optional[world.Entity]:
1667
+ """
1668
+ Launches a projectile from the player's eyes in their line of sight.
1669
+ """
1670
+ raise NotImplementedError
1671
+ def get_advancement_progress(self, advancement_id: str) -> Optional[advancement.AdvancementProgress]:
1672
+ """
1673
+ Advancements
1674
+ Returns the progress of the specified advancement for this player, if the advancement exists.
1675
+ """
1676
+ raise NotImplementedError
1677
+ def award_advancement_criterion(self, advancement_id: str, criterion: str) -> bool:
1678
+ """
1679
+ Awards a specific criterion of an advancement to the player.
1680
+ Returns true if the criterion was successfully awarded (was not already completed).
1681
+ """
1682
+ raise NotImplementedError
1683
+ def revoke_advancement_criterion(self, advancement_id: str, criterion: str) -> bool:
1684
+ """
1685
+ Revokes a specific criterion of an advancement from the player.
1686
+ Returns true if the criterion was successfully revoked (was previously completed).
1687
+ """
1688
+ raise NotImplementedError
1689
+ def award_advancement(self, advancement_id: str) -> bool:
1690
+ """
1691
+ Awards all criteria of the specified advancement to the player.
1692
+ Returns true if any criterion was newly awarded.
1693
+ """
1694
+ raise NotImplementedError
1695
+ def revoke_advancement(self, advancement_id: str) -> bool:
1696
+ """
1697
+ Revokes all criteria of the specified advancement from the player.
1698
+ Returns true if any criterion was newly revoked.
1699
+ """
1700
+ raise NotImplementedError
1701
+ def has_advancement(self, advancement_id: str) -> bool:
1702
+ """
1703
+ Checks whether the player has completed the specified advancement.
1704
+ """
1705
+ raise NotImplementedError
1706
+ def get_completed_advancements(self) -> List[str]:
1707
+ """
1708
+ Returns a list of all advancement IDs completed by this player.
1709
+ """
1710
+ raise NotImplementedError
1711
+ def get_selected_advancement_tab(self) -> Optional[str]:
1712
+ """
1713
+ Returns the ID of the currently selected advancement tab for this player, if any.
1714
+ """
1715
+ raise NotImplementedError
1716
+ def set_selected_advancement_tab(self, tab_id: Optional[str]) -> None:
1717
+ """
1718
+ Sets the selected advancement tab for this player (must be a root advancement ID).
1719
+ """
1720
+ raise NotImplementedError
1721
+ def as_java(self) -> Optional[JavaPlayer]:
1722
+ """
1723
+ Returns a Java-specific player handle, if the player is connected via Java Edition.
1724
+
1725
+ This allows access to Java-exclusive features like sending specific packets
1726
+ or retrieving the client brand.
1727
+ """
1728
+ raise NotImplementedError
1729
+ def as_bedrock(self) -> Optional[BedrockPlayer]:
1730
+ """
1731
+ Returns a Bedrock-specific player handle, if the player is connected via Bedrock Edition.
1732
+
1733
+ This allows access to Bedrock-exclusive features like custom forms
1734
+ or detailed device information.
1735
+ """
1736
+ raise NotImplementedError
1737
+ def __enter__(self) -> Self:
1738
+ """Returns self"""
1739
+ return self
1740
+
1741
+ def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> bool | None:
1742
+ """
1743
+ Release this resource.
1744
+ """
1745
+ raise NotImplementedError
1746
+
1747
+
1748
+
1749
+ def get_world_players(world_ref: world.World) -> List[Player]:
1750
+ """
1751
+ Returns a list of all players in a specific world.
1752
+ """
1753
+ raise NotImplementedError