I'm pretty sure that you can't bypass a plugin which replaces ores with stone or other blocks before sending the data to the client - as far as the client is concerned the ores don't exist at all until the server itself knows that you can see them, much like how you can't see any further than the server's view distance since it doesn't send the chunks to the client, even if the client has a higher render distance. Nor can mods alter how a server functions (some cheat/hacks work because the client has priority over things like player movement and attacking, to an extent).
Pretty much what TheMasterCaver said, when the server sends data to your client about what blocks the world is built up of it replaces all the ores except the ones you can actually see (without X-ray) with stone.
So even if your client is hacked, or glitches, all you can see is stone. (And the few ore blocks that are exposed in the walls of the cave or mining tunnel.)
There's another variant that does the opposite, it replaces stone with random ores and other valuable blocks like gold, emerald, diamond, T.N.T etc, it gives a nearly kaleidoscopic effect when you get X-ray glitches.
@TheMasterCaver, if the server is *lying* to your client as an anti-cheat measure, you are correct. There really is nothing @beastbear500 can do. I also agree with @webrosc there is nothing anyone *should* do to assist. It's my POV that...
1) Everyone should know and follow the rules of the server they are on, find a different one with rules that suit, or start their own server.
2) Everyone is entitled to be aware of available *tools* for solving problems with Redstone in Single Player. X-ray is one of those tools (along with Spectator Mode) to figure out how things work or DO NOT work, as the case may be. But your rights in Single Player DO NOT transfer over to Survival Multi-Player (SMP).
3) I enjoy playing on a server that has the following set of rules: If you "cheat" and ruin the game for yourself, I'll be disappointed. If you "cheat" and ruin the game for someone *ELSE*, I'll be annoyed, and I usually express my annoyance with perma-bans.
Life is simply too short for *me* to worry about someone else cheating, but if you are going to play on a server that bothers to mask ore spawning with anti-cheat AND YOU KNOW THIS, you really need to be honest enough with yourself to find another server that lets you do what you want. Anything else is going to be a pain to the server staff. Hopefully they have perma-bans on cheaters.
I'm not sure if i'm allowed to say this but maybe use an x-ray resourcepack along with changing your gamma to 10.
This won't work if the server isn't even sending the data in the first place; I presume it calculates visibility in much the same way as when calculating whether you can see through or collide with a block, using the vanilla block collision boxes (resource packs can only change the block models client-side; the way post-1.8 x-ray resource packs work is by changing the models, as opposed to textures, which no longer works because the game rejects transparency in textures that aren't supposed to have it, and otherwise occlusion culling hides chunk sections that aren't supposed to be visible (older versions had an "Advanced OpenGL" setting which used the GPU to compute culling based on what was visible on screen after rendering, so transparent textures would reveal everything behind them. Either way, simple texture changes only revealed caves and ores in the walls of caves, while 1.8+ packs can reveal fully hidden ores).
Also, Mojang really needs to add in code that validates the settings within options.txt - too many crashes and other issues occur when switching between game versions because it just reads in any old value even if it causes a fatal error, or in the case of gamma, enables players to cheat by giving themselves "night vision" (plus the game only goes down to 5% of full brightness even at the lowest brightness setting in-game):
If I were in charge of game development you wouldn't even be able to edit options.txt to set gamma outside of its intended range of 0-1:
// Prevents user from editing options.txt to set gamma outside its valid range of 0-1
if (this.minecraft.gameSettings.gammaSetting > 1.0F) this.minecraft.gameSettings.gammaSetting = 1.0F;
if (this.minecraft.gameSettings.gammaSetting < 0.0F) this.minecraft.gameSettings.gammaSetting = 0.0F;
Not that it would make a difference for total darkness, which is pitch black, no matter what, since I separately set the pixel corresponding to (block 0, sky 0) to black in the Overworld (as seen on Bright and with enhanced contrast in GIMP. Setting monitor brightness very high will just make the dark areas a uniform gray):
(this code overrides the method that Optifine modifies to enable using a custom lightmap so you can't get around it that way; of course, if this were in vanilla they would have done it anyway, which is always an issue with a game that is as easy to mod as Minecraft).
This is what the modified lightmap looks like on Moody and Bright (Moody is the same as vanilla except the upper-left pixel is black; Bright is slightly darker at lower light levels with a greater difference between 0 and 15):
(this also shows the main reason why I don't like Moody; notice how fast the light level decreases from the highest levels, especially for sky light, where a light level; of 15 is about the same but level 14 is already as dark as level 9 on Bright. Interestingly, in both cases the highest two block light levels are the same - a torch (14) is visually just as bright as glowstone (15), and also furnaces (13) on Bright).