How do I get back into creative mode from being stuck in adventure mode?

I'm currently creating a server for some friends and me to play on, and I needed to change the game mode to adventure within a certain radius. I have an underground room where all of my command blocks are that I'm usually in creative for, but since I put a command block in which sets all players in a 75 block radius into adventure mode, I'm currently stuck in the room because I can't get into creative mode to fly out.

Anyone know a fix?


You should use /setblock ~ ~-0.5 ~ minecraft:air destroy while standing on the command block in order to remove it and thus stop it from setting you into adventure mode, and then you can use /gamemode to put yourself back into creative.