I think if you show us more code, we would see that you are trying to call world.setBlock from the client, and it must always be called from the server to add a block.
The clue here, is that you have a mop, which is typically the abbreviation for an object that is only found on the client side of things.
If you don't know what I mean by client/server, then I'd recommend a few google searches to learn more about that. If you do, then there are several ways to solve this problem (to be specific, I'd really need to see your code). You can send a message to the server to do the world.setBlock. Or you can change your code so that whatever you are doing that needs to call world.setBlock, is running on the server and not the client.