Fix CraftSound backwards compatibility

Dieser Commit ist enthalten in:
BillyGalbreath 2020-12-17 15:28:31 -06:00 committet von Mariell
Ursprung fb36f15d6c
Commit fe5f035db7

Datei anzeigen

@ -0,0 +1,21 @@
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
index a7137123f698929263d342d5f8da1b34be3c9d5e..1b6a1a5fb86d0790713c09de4f36b287663a9bbf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -27,4 +27,10 @@ public class CraftSound {
public static Sound getBukkit(SoundEffect soundEffect) {
return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(IRegistry.SOUND_EVENT.getKey(soundEffect)));
}
+
+ // Paper start
+ public static String getSound(Sound sound) {
+ return sound.getKey().getKey();
+ }
+ // Paper end
}