mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-12-24 01:17:37 +01:00
Replace deprecated usages of CompatibleSound with XSound
This commit is contained in:
parent
ccb34a3602
commit
441bea2a21
@ -1,6 +1,6 @@
|
||||
package com.craftaro.ultimatestacker.listeners.item;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.ultimatestacker.api.UltimateStackerApi;
|
||||
import com.craftaro.ultimatestacker.api.stack.item.StackedItem;
|
||||
import com.craftaro.ultimatestacker.settings.Settings;
|
||||
@ -29,7 +29,7 @@ public class ItemCurrentListener implements Listener {
|
||||
if (amount < (stack.getMaxStackSize() / 2)) return;
|
||||
event.setCancelled(true);
|
||||
Player player = (Player) event.getEntity();
|
||||
player.playSound(player.getLocation(), CompatibleSound.ENTITY_ITEM_PICKUP.getSound(), .2f, (float) (1 + Math.random()));
|
||||
XSound.ENTITY_ITEM_PICKUP.play(player, .2f, (float) (1 + Math.random()));
|
||||
Methods.updateInventory(event.getItem(), player.getInventory());
|
||||
} else {
|
||||
stackedItem.setAmount(amount - 1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.craftaro.ultimatestacker.listeners.item;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.ultimatestacker.api.UltimateStackerApi;
|
||||
import com.craftaro.ultimatestacker.settings.Settings;
|
||||
import com.craftaro.ultimatestacker.utils.Methods;
|
||||
@ -27,7 +27,7 @@ public class ItemLegacyListener implements Listener {
|
||||
if (amount < (stack.getMaxStackSize() / 2)) return;
|
||||
event.setCancelled(true);
|
||||
|
||||
event.getPlayer().playSound(event.getPlayer().getLocation(), CompatibleSound.ENTITY_ITEM_PICKUP.getSound(), .2f, (float) (1 + Math.random()));
|
||||
XSound.ENTITY_ITEM_PICKUP.play(event.getPlayer(), .2f, (float) (1 + Math.random()));
|
||||
|
||||
Methods.updateInventory(event.getItem(), event.getPlayer().getInventory());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user