PaperMC/patches/unapplied/server/0516-Fix-CraftSound-backwards-compatibility.patch

22 lines
927 B
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Thu, 17 Dec 2020 15:25:49 -0600
Subject: [PATCH] Fix CraftSound backwards compatibility
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
2022-12-07 21:16:54 +01:00
index 180275a8b9d48d0c5a7bbaa950de619aed2dad53..5b68188d1a7b5a75e2f4b61e8d415b5784e0d8c0 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
2022-12-07 21:16:54 +01:00
@@ -27,4 +27,10 @@ public class CraftSound {
2021-06-11 14:02:28 +02:00
public static Sound getBukkit(SoundEvent soundEffect) {
2022-12-07 21:16:54 +01:00
return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(BuiltInRegistries.SOUND_EVENT.getKey(soundEffect)));
2021-06-11 14:02:28 +02:00
}
+
+ // Paper start
+ public static String getSound(Sound sound) {
+ return sound.getKey().getKey();
+ }
+ // Paper end
}