Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added event types #456

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ declare module 'bedrock-protocol' {
// # Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"
| 'failed_server_full'

type Packets = "login" | "play_status" | "server_to_client_handshake" | "client_to_server_handshake" | "disconnect" | "resource_packs_info" | "resource_pack_stack" | "resource_pack_client_response" | "text" | "set_time" | "start_game" | "add_player" | "add_entity" | "remove_entity" | "add_item_entity" | "take_item_entity" | "move_entity" | "move_player" | "rider_jump" | "update_block" | "add_painting" | "tick_sync" | "level_sound_event_old" | "level_event" | "block_event" | "entity_event" | "mob_effect" | "update_attributes" | "inventory_transaction" | "mob_equipment" | "mob_armor_equipment" | "interact" | "block_pick_request" | "entity_pick_request" | "player_action" | "hurt_armor" | "set_entity_data" | "set_entity_motion" | "set_entity_link" | "set_health" | "set_spawn_position" | "animate" | "respawn" | "container_open" | "container_close" | "player_hotbar" | "inventory_content" | "inventory_slot" | "container_set_data" | "crafting_data" | "crafting_event" | "gui_data_pick_item" | "adventure_settings" | "block_entity_data" | "player_input" | "level_chunk" | "set_commands_enabled" | "set_difficulty" | "change_dimension" | "set_player_game_type" | "player_list" | "simple_event" | "event" | "spawn_experience_orb" | "clientbound_map_item_data" | "map_info_request" | "request_chunk_radius" | "chunk_radius_update" | "item_frame_drop_item" | "game_rules_changed" | "camera" | "boss_event" | "show_credits" | "available_commands" | "command_request" | "command_block_update" | "command_output" | "update_trade" | "update_equipment" | "resource_pack_data_info" | "resource_pack_chunk_data" | "resource_pack_chunk_request" | "transfer" | "play_sound" | "stop_sound" | "set_title" | "add_behavior_tree" | "structure_block_update" | "show_store_offer" | "purchase_receipt" | "player_skin" | "sub_client_login" | "initiate_web_socket_connection" | "set_last_hurt_by" | "book_edit" | "npc_request" | "photo_transfer" | "modal_form_request" | "modal_form_response" | "server_settings_request" | "server_settings_response" | "show_profile" | "set_default_game_type" | "remove_objective" | "set_display_objective" | "set_score" | "lab_table" | "update_block_synced" | "move_entity_delta" | "set_scoreboard_identity" | "set_local_player_as_initialized" | "update_soft_enum" | "network_stack_latency" | "script_custom_event" | "spawn_particle_effect" | "available_entity_identifiers" | "level_sound_event_v2" | "network_chunk_publisher_update" | "biome_definition_list" | "level_sound_event" | "level_event_generic" | "lectern_update" | "video_stream_connect" | "add_ecs_entity" | "remove_ecs_entity" | "client_cache_status" | "on_screen_texture_animation" | "map_create_locked_copy" | "structure_template_data_export_request" | "structure_template_data_export_response" | "update_block_properties" | "client_cache_blob_status" | "client_cache_miss_response" | "education_settings" | "emote" | "multiplayer_settings" | "settings_command" | "anvil_damage" | "completed_using_item" | "network_settings" | "player_auth_input" | "creative_content" | "player_enchant_options" | "item_stack_request" | "item_stack_response" | "player_armor_damage" | "update_player_game_type" | "emote_list" | "position_tracking_db_request" | "position_tracking_db_broadcast" | "violation_warning" | "motion_prediction_hints" | "animate_entity" | "camera_shake" | "player_fog" | "correct_player_move_prediction" | "item_component" | "filter_text_packet" | "debug_renderer" | "sync_entity_property" | "add_volume_entity" | "remove_volume_entity" | "simulation_type" | "npc_dialogue" | "edu_uri_resource_packet" | "create_photo" | "update_subchunk_blocks" | "photo_info_request" | "SubChunkEntryWithoutCaching" | "SubChunkEntryWithCaching" | "subchunk" | "subchunk_request" | "client_start_item_cooldown" | "script_message" | "code_builder_source" | "ticking_areas_load_status" | "dimension_data" | "agent_action" | "change_mob_property" | "lesson_progress" | "request_ability" | "request_permissions" | "toast_request" | "update_abilities" | "update_adventure_settings" | "death_info" | "editor_network" | "feature_registry" | "server_stats" | "request_network_settings" | "game_test_request" | "game_test_results" | "update_client_input_locks" | "client_cheat_ability" | "camera_presets" | "unlocked_recipes" | "camera_instruction" | "compressed_biome_definitions" | "trim_data" | "open_sign" | "agent_animation" | "refresh_entitlements";
export class Client extends Connection {
constructor(options: Options)
// The client's EntityID returned by the server
Expand All @@ -116,8 +117,11 @@ declare module 'bedrock-protocol' {
* Send a disconnect packet and close the connection
*/
disconnect(): void

on(event: Packets, cb: (client: Player) => void): any
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type on this is wrong

}


/**
* `Player` represents a player connected to the server.
*/
Expand Down
Loading