Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c8866af418
|
|||
|
359dbba09a
|
|||
|
c513d6990a
|
|||
|
6155bb0d42
|
|||
|
5514753f31
|
@@ -1,3 +1,3 @@
|
||||
projectGroup=ghast
|
||||
projectName=ghast-tools
|
||||
projectVersion=1.6
|
||||
projectVersion=1.7
|
||||
27
src/main/java/ghast/EffectsHelper.java
Normal file
27
src/main/java/ghast/EffectsHelper.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package ghast;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.SoundCategory;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@UtilityClass
|
||||
@SuppressWarnings("unused")
|
||||
public class EffectsHelper {
|
||||
|
||||
public void playSound(Location location, Sound sound, float pitch) {
|
||||
location.getWorld().playSound(location, sound, SoundCategory.MASTER, 1.0f, pitch);
|
||||
}
|
||||
|
||||
public void particle(Location location, Particle particle, double dx, double dy, double dz, double speed, int amount) {
|
||||
location.getWorld().spawnParticle(particle, location, amount, dx, dy, dz, speed);
|
||||
}
|
||||
|
||||
//TODO нужно проверить
|
||||
public void particle(Location location, Particle particle, Vector vector, double speed, int amount) {
|
||||
particle(location, particle, vector.getX(), vector.getY(), vector.getZ(), speed, amount);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user