According to Mojang's EULA it states "If you make any content available on or through our Game, you must give us permission to use, copy, modify and adapt that content. This permission must be irrevocable, [b]and you must also permit other people to use, copy, modify and adapt your content. If you don‘t want to give us this permission, do not make content available on or through our Game. Please think carefully before you make any content available, because it will be made public and might even be used by other people in a way you don‘t like.
https://account.mojang.com/documents/minecraft_eula