import { world } from "@minecraft/server"
import { CUSTOM_TORCHES } from "./common/customTorches"
import { CACTUS_SPIKE_TRAPS } from "./common/cactusSpikeTraps"

world.afterEvents.playerPlaceBlock.subscribe(ev => {
    const {block, dimension, player} = ev

    if (CUSTOM_TORCHES.isCustomTorch(block)) CUSTOM_TORCHES.wasPlaced(block) 
    if (CACTUS_SPIKE_TRAPS.isCactusSpikeTrap(block)) CACTUS_SPIKE_TRAPS.wasPlaced(block)
})