Startup: ```js
StartupEvents.registry('block', (block) => {
block.create('leave_school', 'detector').detectorId('leave_school')
block.create('luminizer_1', 'detector').detectorId('luminizer_1')
})
Server: ```js
BlockEvents.detectorPowered('leave_school', (event) => {
let nearbyPlayers = event.block.playersInRadius
for (let player of nearbyPlayers) player.runCommand('/school leave')
})
BlockEvents.detectorPowered('luminizer_1', (event) => {
const thisBlock = event.block
const here = event.block.position
thisBlock.set('botania:light_relay')
thisBlock.entityData = {
bindX: here.x + 1,
bindY: here.y + 1,
bindZ: here.z + 2,
}
})
Both detectors, when powered by redstone, turn themselves into a Luminizer, and also run the command /school leave.