I'm sure he's using the fork Geniysis, which does support Anvil. If he does, we can't support you further :/
Now are we discussing what third-party PocketMine modifications support anvils? Please, the OP was just asking about preventing the player using anvil. He didn't specify which version he is using, so we assume PocketMine. Or if you don't want to assume, just ask him directly. Nobody is reading this thread to see what versions support Anvils.
PM doesn't support using the anvil at all. So this thread is useless if we want to talk bout' PM. And i won't start to talk bout' other forks here. Even if I'm developing one, I'll not advertise here for it. See i didn't mention it's name!
The only thing that you can do is cancel the PlayerInteractEvent when player click the Anvil. Doing this, you renounce to the repair of items.