diff --git a/common/build.gradle b/common/build.gradle index f9f7a33..3129896 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,8 +1,8 @@ dependencies { implementation project(':core') - compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT' - compileOnly 'org.geysermc.floodgate:api:2.2.2-SNAPSHOT' + compileOnly 'io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT' + compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT' implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'com.sparkjava:spark-core:2.9.4' } diff --git a/core/build.gradle b/core/build.gradle index 418c148..34337b5 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,6 +1,6 @@ dependencies { - compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT' - compileOnly 'org.geysermc.floodgate:api:2.2.2-SNAPSHOT' + compileOnly 'io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT' + compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT' implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'com.sparkjava:spark-core:2.9.4' implementation 'org.reflections:reflections:0.10.2' diff --git a/core/src/main/java/eu/mhsl/craftattack/spawn/core/util/world/InteractSounds.java b/core/src/main/java/eu/mhsl/craftattack/spawn/core/util/world/InteractSounds.java index eda553e..8c54e21 100644 --- a/core/src/main/java/eu/mhsl/craftattack/spawn/core/util/world/InteractSounds.java +++ b/core/src/main/java/eu/mhsl/craftattack/spawn/core/util/world/InteractSounds.java @@ -1,6 +1,7 @@ package eu.mhsl.craftattack.spawn.core.util.world; -import net.kyori.adventure.key.Key; +import io.papermc.paper.registry.TypedKey; +import io.papermc.paper.registry.keys.SoundEventKeys; import net.kyori.adventure.sound.Sound; import org.bukkit.entity.Player; @@ -15,23 +16,22 @@ public class InteractSounds { this.player = player; } - private void playSound(org.bukkit.Sound sound) { - this.player.playSound(this.getSound(sound.key()), Sound.Emitter.self()); - } - - private Sound getSound(Key soundKey) { - return Sound.sound(soundKey, Sound.Source.PLAYER, 1f, 1f); + private void playSound(TypedKey sound) { + this.player.playSound( + Sound.sound(sound, Sound.Source.PLAYER, 1f, 1f), + Sound.Emitter.self() + ); } public void click() { - this.playSound(org.bukkit.Sound.UI_BUTTON_CLICK); + this.playSound(SoundEventKeys.UI_BUTTON_CLICK); } public void success() { - this.playSound(org.bukkit.Sound.ENTITY_PLAYER_LEVELUP); + this.playSound(SoundEventKeys.ENTITY_PLAYER_LEVELUP); } public void delete() { - this.playSound(org.bukkit.Sound.ENTITY_SILVERFISH_DEATH); + this.playSound(SoundEventKeys.ENTITY_SILVERFISH_DEATH); } } diff --git a/craftattack/build.gradle b/craftattack/build.gradle index 43f1560..be30e01 100644 --- a/craftattack/build.gradle +++ b/craftattack/build.gradle @@ -2,8 +2,8 @@ dependencies { implementation project(':core') implementation project(':common') - compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT' - compileOnly 'org.geysermc.floodgate:api:2.2.2-SNAPSHOT' + compileOnly 'io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT' + compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT' implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'com.sparkjava:spark-core:2.9.4' } \ No newline at end of file diff --git a/craftattack/src/main/java/eu/mhsl/craftattack/spawn/craftattack/appliances/gameplay/glowingBerries/GlowingBerries.java b/craftattack/src/main/java/eu/mhsl/craftattack/spawn/craftattack/appliances/gameplay/glowingBerries/GlowingBerries.java index 27b917a..76d32c8 100644 --- a/craftattack/src/main/java/eu/mhsl/craftattack/spawn/craftattack/appliances/gameplay/glowingBerries/GlowingBerries.java +++ b/craftattack/src/main/java/eu/mhsl/craftattack/spawn/craftattack/appliances/gameplay/glowingBerries/GlowingBerries.java @@ -1,6 +1,7 @@ package eu.mhsl.craftattack.spawn.craftattack.appliances.gameplay.glowingBerries; import eu.mhsl.craftattack.spawn.core.appliance.Appliance; +import io.papermc.paper.registry.keys.SoundEventKeys; import net.kyori.adventure.sound.Sound; import net.kyori.adventure.util.Ticks; import org.bukkit.entity.Player; @@ -23,7 +24,7 @@ public class GlowingBerries extends Appliance { public void letPlayerGlow(Player player) { player.addPotionEffect(glowEffect); - Sound sound = Sound.sound(org.bukkit.Sound.BLOCK_AMETHYST_BLOCK_CHIME.key(), Sound.Source.PLAYER, 1f, 1f); + Sound sound = Sound.sound(SoundEventKeys.BLOCK_AMETHYST_BLOCK_CHIME, Sound.Source.PLAYER, 1f, 1f); player.stopSound(sound); player.playSound(sound, Sound.Emitter.self()); } diff --git a/varo/build.gradle b/varo/build.gradle index 6572533..ec631a1 100644 --- a/varo/build.gradle +++ b/varo/build.gradle @@ -2,7 +2,7 @@ dependencies { implementation project(':core') implementation project(':common') - compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT' + compileOnly 'io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT' implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'com.sparkjava:spark-core:2.9.4' } \ No newline at end of file