What is intended is to give everyone access to the source code but to restrict what they modify.
So what first came to mind is if there's any way to, when building the plugin/project, some sort of restriction is applied to the files that have been modified and if some unnauthorized modifications have been made the build fails.
An example would be that only some users may modify the java files, but all users can modify XML configurations and build the jar.
Or if this isn't possible what alternative do I have to restrict source code modifications?