Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

192
Visualizações
Minecraft Bedrock Edition scripting events?

I am currently using Node.js with yo and gulp to create a behavior pack with scripts. I'm struggling to find a proper list of all the API events online so I was hoping someone here could help me with them. I've been trying to find the identifier for the event that occurs when a chat message is sent.

My code:

var clientSystem = client.registerSystem(0, 0);

// Setup which events to listen for
clientSystem.initialize = function () {
    // Register any events you will send to the client
    const eventDataDefaults = {narf: false}
    clientSystem.registerEventData("test:pinky", eventDataDefaults)

    clientSystem.listenForEvent("minecraft:chat_broadcast_event", (eventData) => {
        eventData.message = `${eventData.sender.name} sent a message!`;
    });

    // Register any components you will attach to game objects
    // system.registerComponent(...)

    // Set up any events you wish to listen to
    // system.listenForEvent(...);

    // Enable full logging, useful for seeing errors, you will probably want to disable this for
    // release versions of your scripts.
    // Generally speaking it's not recommended to use broadcastEvent in initialize, but for configuring logging it's fine.
    const scriptLoggerConfig = clientSystem.createEventData("minecraft:script_logger_config");
    scriptLoggerConfig.data.log_errors = true;
    scriptLoggerConfig.data.log_information = true;
    scriptLoggerConfig.data.log_warnings = true;
    clientSystem.broadcastEvent("minecraft:script_logger_config", scriptLoggerConfig);
}

let firstTick = true;
let ticks = 0;
let seconds = 0;

// per-tick updates
clientSystem.update = function() {
    // Any logic that needs to happen every tick on the client.
    ticks++;
    seconds = Math.floor(ticks / 20);

    if(ticks % 20 === 0) {
        let uptime = clientSystem.createEventData("minecraft:display_chat_event");
        uptime.data.message = `Uptime: ${seconds} seconds`;

        clientSystem.broadcastEvent("minecraft:display_chat_event", uptime);
    }
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda