import { world } from "@minecraft/server"

world.events.beforeChat.subscribe((chatEvent) => {
  let message = chatEvent.message.toLowerCase();

  if (message.startsWith("!")) {
    chatEvent.cancel = true;
    switch (message) {
      //help list

      case "!contributors":
        chatEvent.sender.runCommandAsync(
          `tellraw @s{"rawtext":[{"text": "§eContributors:\n§aLegend\n§aCreepager15\n§aHachuden\n§aSumi (Yanna :3)\n§aPan (i,love.pandas)\n§aXorkent\n§aCiosciaa\n§aHerobrine64\n§aElektrika\n§aJayly"}]}`
        );
        break;
    }
  }
});
