SimpleEssential/src/main/java/cn/citycraft/SimpleEssential/utils/EffectUtil.java

43 lines
764 B
Java
Raw Normal View History

/**
*
*/
package cn.citycraft.SimpleEssential.utils;
import org.bukkit.Effect;
import org.bukkit.Location;
/**
*
*
* @author
* 20158142:07:02
*
*/
public class EffectUtil {
2015-08-18 12:08:36 +00:00
/**
*
2015-08-18 12:08:36 +00:00
*
* @param loc
2015-08-18 12:08:36 +00:00
* -
* @param range
2015-08-18 12:08:36 +00:00
* -
* @param effects
* -
*/
public static void run(Location loc, long range, Effect... effects) {
try {
int i;
if (range < 2) {
range = 2;
}
for (i = 0; i < range; i++) {
for (Effect effect : effects) {
loc.getWorld().playEffect(loc, effect, 10, 100);
}
}
} catch (Exception e) {
}
}
}