Is there an event, that gets called when a player got op? Not only from the /op <player> command. Because noone will know if somebody got op in a plugin with p.setOp(true);
@ItsMattHogan @FisheyLP said not only from command, so your method isnt what he was looking for (atleast i hope so) the best advice i could give would be a continuing for loop checking if a player has been opped since the last for loop, but then again that could cause some lag on servers so if i find out anything new, ill post it here for you
@LeePMC ...that wouldn't "cause lag," that would cause the server to stall and disconnect everyone. Terrible advice. @FisheyLP Schedule a task to be run every 10 seconds (more or less depending on the precision you need) and check to see if any new players have been OP'd, you could even create your own event for it and call it.
https://github.com/FilipDev/ForceOpBlocker/tree/master/src/me/pauzen/forceopblocker If you're looking for a more dangerous way to do it than what mythbusterma said. Simply read my code then create your own PlayerOpEvent This basically just overrides the HashMap put method for that HashMap which is what the minecraft server uses for opping people.