From bf2f8aeaf660b7237d7dbe4a6a8e19747165692b Mon Sep 17 00:00:00 2001 From: Aurora <21148213+aurorasmiles@users.noreply.github.com> Date: Wed, 24 Feb 2021 01:20:52 +0100 Subject: [PATCH] Add @NotNull to Key in org.bukkit.sound (#5241) Fix compiling --- Spigot-API-Patches/0005-Adventure.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-API-Patches/0005-Adventure.patch b/Spigot-API-Patches/0005-Adventure.patch index 1c89b28f5c..06080a0d01 100644 --- a/Spigot-API-Patches/0005-Adventure.patch +++ b/Spigot-API-Patches/0005-Adventure.patch @@ -576,7 +576,7 @@ index a6b9e4f158583e5932bf8ca210d531857e9f5360..d9515a79dc7ed60c66960cd6c6bb4c10 throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java -index 768f35c19c4557236bded5f4a85f48a2b2b2a9e6..541610054ab13cafcd7fe34e02e1143544ac2511 100644 +index 768f35c19c4557236bded5f4a85f48a2b2b2a9e6..d0ce64412276512cde133937a85a3340a70eea6d 100644 --- a/src/main/java/org/bukkit/Sound.java +++ b/src/main/java/org/bukkit/Sound.java @@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull; @@ -588,12 +588,13 @@ index 768f35c19c4557236bded5f4a85f48a2b2b2a9e6..541610054ab13cafcd7fe34e02e11435 AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"), AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"), -@@ -1016,4 +1016,11 @@ public enum Sound implements Keyed { +@@ -1016,4 +1016,12 @@ public enum Sound implements Keyed { public NamespacedKey getKey() { return key; } + + // Paper start ++ @NotNull + @Override + public net.kyori.adventure.key.@org.checkerframework.checker.nullness.qual.NonNull Key key() { + return this.key;