CommonAddedEvents.playerChangeDimension(event => {

    let dimension = String(event.getNewWorldKey())
    console.log(dimension)
    if (dimension.slice(34, dimension.length-1) == "dimdungeons:dungeon_dimension"){
        //event.server.tell('entered dimensional dungeon')
        event.server.runCommandSilent(`/shader apply ${event.player.username} minecraft:shaders/post/notch.json`)
        
    }
    else
        event.server.runCommandSilent(`/shader remove ${event.player.username}`)

});

PlayerEvents.respawned((event) => {
  Utils.server.scheduleInTicks(20, (callback) => {
    event.server.runCommandSilent(`/shader remove ${event.player.username}`);
  });
});

