import {
  world, system
} from "@minecraft/server";
import {ActionFormData} from "@minecraft/server-ui"
  




world.afterEvents.itemUse.subscribe((eventData) => {
  let player = eventData.source
  let itemUse = eventData.itemStack.typeId
  if (itemUse == "edx:quest_book") {
    wiki(player);
  }
  if (itemUse == "edx:interdimensionals_socks") {
    final_socks(player);
  }
});
// Ouvrir UI
   



                  function final_socks(player) {
                      var interdimensional_socks = {
    translate: "item.interdimensional_socks.name",
  };
                        var interdimensional_socks_desc = {
    translate: "interdimensional_socks_desc",
  };
                  var form = new ActionFormData()
                    .title(interdimensional_socks)
                    .body(interdimensional_socks_desc)
                    form.show(player).then(result => {
                     })}



                  






                function wiki(player) {
                var CONFLICT = {
    translate: "conflict",
  };
             let form = new ActionFormData()
               .title("wiki.Wiki")
               .body(CONFLICT)
               form.show(player).then(result => {
                
                })}