PlayerEvents.loggedIn(event => {
   let player = event.player;
 
   // Schedule a task to run after 100 ticks (5 seconds in Minecraft)
   event.server.schedule(100, () => {
     // Loop through the player's inventory and remove all golden apples
     player.inventory.items.forEach(item => {
       if (item.id === 'minecraft:ghast_tear') {
         // Remove the golden apple
         item.count = 0;
       }
     });
 
     // Optionally, send a message to the player
     player.tell('BIENVENUE SUR WANKIL CRAZY : LUCKY BLOCK INVASION');
   });
 });