Skip to content

Commit

Permalink
Replace deprecated usages of CompatibleSound with XSound
Browse files Browse the repository at this point in the history
  • Loading branch information
SpraxDev committed Jun 29, 2023
1 parent 97414b2 commit 2190393
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.craftaro.core.SongodaPlugin;
import com.craftaro.core.compatibility.CompatibleParticleHandler;
import com.craftaro.core.compatibility.CompatibleSound;
import com.craftaro.core.compatibility.ServerVersion;
import com.craftaro.core.hooks.EconomyManager;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
import com.songoda.epichoppers.EpicHoppersApi;
import com.songoda.epichoppers.api.events.HopperAccessEvent;
import com.songoda.epichoppers.database.DataManager;
Expand Down Expand Up @@ -156,12 +156,12 @@ private void upgradeFinal(Level level, Player player) {
}

if (getLevelManager().getHighestLevel() != level) {
player.playSound(player.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15.0F);
XSound.ENTITY_PLAYER_LEVELUP.play(player, .6f, 15);
} else {
player.playSound(player.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 2F, 25.0F);
player.playSound(player.getLocation(), CompatibleSound.BLOCK_NOTE_BLOCK_CHIME.getSound(), 2F, 25.0F);
Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), () -> player.playSound(player.getLocation(), CompatibleSound.BLOCK_NOTE_BLOCK_CHIME.getSound(), 1.2F, 35.0F), 5L);
Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), () -> player.playSound(player.getLocation(), CompatibleSound.BLOCK_NOTE_BLOCK_CHIME.getSound(), 1.8F, 35.0F), 10L);
XSound.ENTITY_PLAYER_LEVELUP.play(player, 2, 25);
XSound.BLOCK_NOTE_BLOCK_CHIME.play(player, 2, 25);
Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), () -> XSound.BLOCK_NOTE_BLOCK_CHIME.play(player, 1.2f, 35), 5);
Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), () -> XSound.BLOCK_NOTE_BLOCK_CHIME.play(player, 1.8f, 35), 10);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.songoda.epichoppers.hopper.teleport;

import com.craftaro.core.compatibility.CompatibleSound;
import com.craftaro.core.compatibility.ServerVersion;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
import com.songoda.epichoppers.EpicHoppers;
import com.songoda.epichoppers.hopper.Hopper;
import com.songoda.epichoppers.settings.Settings;
Expand Down Expand Up @@ -119,6 +119,6 @@ private void doTeleport(Entity entity, Location location) {

entity.teleport(location);

CompatibleSound.ENTITY_ENDERMAN_TELEPORT.play(entity.getWorld(), entity.getLocation(), 10, 10);
XSound.ENTITY_ENDERMAN_TELEPORT.play(entity.getLocation(), 10, 10);
}
}

0 comments on commit 2190393

Please sign in to comment.