diff --git a/build.gradle.kts b/build.gradle.kts
index ecfc0abe25..b2230193a4 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -27,6 +27,10 @@ allprojects {
 
 val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
 
+tasks.remapSpigotSources {
+    sourceCompatibility = 21 // TODO change default in paperweight
+}
+
 subprojects {
     tasks.withType<JavaCompile> {
         options.encoding = Charsets.UTF_8.name()