/**
  
  █▀▄▀█ █▀█ █▄░█ █░█ █▀▄▀█ █▀▀ █▄░█ ▀█▀ ▄▀█ █░░   █▀▀ ▀▄▀ █▀█ █▀▀ █▀█ █ █▀▀ █▄░█ █▀▀ █▀▀
  █░▀░█ █▄█ █░▀█ █▄█ █░▀░█ ██▄ █░▀█ ░█░ █▀█ █▄▄   ██▄ █░█ █▀▀ ██▄ █▀▄ █ ██▄ █░▀█ █▄▄ ██▄

  ☻/  * @file Starting Kit script for give Player starting items on first login
  /▌  * @copyright KnightDexx's Modded Minecraft World & ModernGamingWorld
  /\

*/
BlockEvents.rightClicked('block.ignite', event => {
    let block = event.block;
    let player = event.player;
    let world = event.world;

    // Check if the block being ignited is part of a Nether portal (obsidian or crying obsidian)
    if (block.id == 'minecraft:obsidian' || block.id == 'minecraft:crying_obsidian') {
        // Cancel the ignition of Nether portals
        event.cancel();

        if (player) {
            player.tell('You cannot ignite Nether portals in this world!');
        }
    }

    // Check if the block being ignited is part of an Undergarden portal (e.g., Spore Lattice or other blocks)
    if (block.id == 'minecraft:stone_bricks' || block.id == 'minecraft:deepslate_bricks') {
        // Allow the Undergarden portal to be ignited
        // You can add more Undergarden-related blocks here if necessary
        return; // Do nothing, letting the event continue normally
    }
});