Migrate usage of CompatibleSound to XSound in the CraftaroCore-Snapshot

This commit is contained in:
Christian Koop 2023-06-24 20:38:29 +02:00
parent 200df50bf6
commit 8bcfca0292
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
3 changed files with 6 additions and 6 deletions

View File

@ -3,9 +3,9 @@ package com.craftaro.epicanchors;
import com.craftaro.core.SongodaPlugin;
import com.craftaro.core.compatibility.CompatibleMaterial;
import com.craftaro.core.compatibility.CompatibleParticleHandler;
import com.craftaro.core.compatibility.CompatibleSound;
import com.craftaro.core.hooks.HologramManager;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBTItem;
import com.craftaro.core.utils.TextUtils;
import com.craftaro.core.utils.TimeUtils;
@ -287,7 +287,7 @@ public class AnchorManagerImpl implements AnchorManager {
}
// Particles & Sound
anchor.getWorld().playSound(anchorLoc, CompatibleSound.ENTITY_GENERIC_EXPLODE.getSound(), 10, 10);
XSound.ENTITY_GENERIC_EXPLODE.play(anchorLoc, 10, 10);
CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.getParticle(Settings.PARTICLE_DESTROY.getString()),
anchor.getLocation().add(.5, .5, .5), 100, .5, .5, .5);

View File

@ -1,11 +1,11 @@
package com.craftaro.epicanchors.guis;
import com.craftaro.core.compatibility.CompatibleParticleHandler;
import com.craftaro.core.compatibility.CompatibleSound;
import com.craftaro.core.gui.Gui;
import com.craftaro.core.gui.GuiUtils;
import com.craftaro.core.hooks.EconomyManager;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
import com.craftaro.core.utils.TextUtils;
import com.craftaro.core.utils.TimeUtils;
import com.craftaro.epicanchors.EpicAnchors;
@ -84,7 +84,7 @@ public class AnchorGui extends Gui {
if (success) {
anchor.addTicksLeft(20 * 60 * 30); // 30 minutes
p.playSound(p.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15);
XSound.ENTITY_PLAYER_LEVELUP.play(p, .6f, 15);
CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.getParticle(Settings.PARTICLE_UPGRADE.getString()),
anchor.getLocation().add(.5, .5, .5), 100, .5, .5, .5);
} else {

View File

@ -2,7 +2,7 @@ package com.craftaro.epicanchors.listener;
import com.craftaro.core.compatibility.CompatibleHand;
import com.craftaro.core.compatibility.CompatibleParticleHandler;
import com.craftaro.core.compatibility.CompatibleSound;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
import com.craftaro.epicanchors.AnchorManagerImpl;
import com.craftaro.epicanchors.EpicAnchors;
import com.craftaro.epicanchors.api.Anchor;
@ -110,7 +110,7 @@ public class AnchorListener implements Listener {
CompatibleHand.MAIN_HAND.takeItem(p, 1);
}
p.playSound(p.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), .6F, 15);
XSound.ENTITY_PLAYER_LEVELUP.play(p, .6f, 15);
CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.getParticle(Settings.PARTICLE_UPGRADE.getString()),
anchor.getLocation().add(.5, .5, .5), 100, .5, .5, .5);
}