本文整理汇总了Java中de.slikey.effectlib.Effect类的典型用法代码示例。如果您正苦于以下问题:Java Effect类的具体用法?Java Effect怎么用?Java Effect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Effect类属于de.slikey.effectlib包,在下文中一共展示了Effect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: enableCosmetic
import de.slikey.effectlib.Effect; //导入依赖的package包/类
@Override
public void enableCosmetic(Player player, ParticleCosmetic cosmetic, ClickType clickType, boolean login, NullType useless)
{
try
{
Effect particleEffectObject = cosmetic.getParticleEffect().getConstructor(EffectManager.class).newInstance(this.effectManager);
particleEffectObject.setEntity(player);
particleEffectObject.infinite();
particleEffectObject.start();
this.playersParticleEffect.put(player.getUniqueId(), particleEffectObject);
if (!login)
player.sendMessage(PlayerManager.COSMETICS_TAG + ChatColor.GREEN + "Vous voilà noyé sous les particules...");
}
catch (ReflectiveOperationException e)
{
this.hub.getCosmeticManager().log(Level.SEVERE, "Can't create EntityEffect object to " + player.getName() + "'s particle effect!");
}
}
示例2: tick
import de.slikey.effectlib.Effect; //导入依赖的package包/类
public static void tick(Player p, PlayerDataRPG pd) {
if (p == null || pd.activeEffect == null)
return;
if (lastLoc.containsKey(p.getUniqueId()) && isSameBlock(lastLoc.get(p.getUniqueId()), p.getLocation())) {
if (stillCount.containsKey(p.getUniqueId())) {
stillCount.put(p.getUniqueId(), stillCount.get(p.getUniqueId()) + 1);
} else {
stillCount.put(p.getUniqueId(), 1);
}
if (isStill(p)) {
if (!activeEffect.containsKey(p.getUniqueId())) {
Effect temp = EffectFactory.getEffect(pd.activeEffect, p);
if(temp == null)
return;
temp.setEntity(p);
temp.start();
activeEffect.put(p.getUniqueId(), temp);
}
}
} else {
if (activeEffect.containsKey(p.getUniqueId())) {
activeEffect.remove(p.getUniqueId()).cancel();
}
lastLoc.put(p.getUniqueId(), p.getLocation());
stillCount.put(p.getUniqueId(), 0);
}
}
示例3: finishEvent
import de.slikey.effectlib.Effect; //导入依赖的package包/类
public void finishEvent() {
eventStarted = false;
for(Effect effect : effects) {
effect.cancel();
}
effects.clear();
for(String locString : RagnorakFile.getLocations()){
Location lloc = Convert.stringToLocation(locString);
if(lloc.getBlock().getState() instanceof Chest) {
Chest chest = (Chest) lloc.getBlock().getState();
chest.getInventory().clear();
}
lloc.getBlock().setType(Material.AIR);
}
}
示例4: cancel
import de.slikey.effectlib.Effect; //导入依赖的package包/类
public void cancel(Collection<Effect> effects) {
for (Effect effect : effects) {
try {
effect.cancel();
} catch (Throwable ex) {
Bukkit.getLogger().warning("Error cancelling effects");
ex.printStackTrace();
}
}
}
示例5: setEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
/**
* Store an active effect within the RayFallEffectManager.
*
* @param effect The EffectLib effect to store
* @param id The ID text for the effect.
*/
public boolean setEffect(Effect effect, String id) {
if (effectMap.containsKey(id)) {
return false;
} else {
effectMap.put(id, effect);
return true;
}
}
示例6: deleteEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
/**
* Remove and stop a stored active effect within the RayFallEffectManager.
*
* @param id The ID text for the effect.
*/
public void deleteEffect(String id) {
if (effectMap.containsKey(id)) {
Effect effect = effectMap.get(id);
effect.cancel();
effectMap.remove(id);
}
}
示例7: getEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
public static Effect getEffect(EffectName name, Player p) {
switch (name) {
case BLOOD_HELIX:
return getBloodHelixEffect();
case EMERALD_STAR:
return getEmeraldStarEffect();
case RAINBOW_HEART:
return getRainbowHeartEffect();
case INFERNO_TAG:
return getInfernoTagEffect(p.getName());
case WATER_SPOUT:
return getWaterSpoutEffect();
case SPARK_RING:
return getSparkRingEffect();
case FLAME_BREATH:
return getFlameBreathEffect();
case ATOMIC:
return getAtomicEffect();
case FALLEN_ANGEL:
return getFallenAngelEffect();
case FAIRY_WINGS:
return getFairyWingsEffect();
case ANGEL_WINGS:
return getAngelWingsEffect();
case PETITE_ANGEL_WINGS:
return getPetiteAngelWingsEffect();
case MUSICAL:
return getMusicalEffect();
case SWIRLY:
return getSwirlyEffect();
case PINK_HEART:
return getPinkHeartEffect();
case RED_HEART:
return getRedHeartEffect();
case BLACK_HEART:
return getBlackHeartEffect();
case RAINY_DAY:
return getRainyDayEffect();
case ZELLUMINATI:
return getZelluminatiEffect();
}
return null;
}
示例8: getBloodHelixEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getBloodHelixEffect() {
return new BloodHelixEffect(em());
}
示例9: getEmeraldStarEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getEmeraldStarEffect() {
return new EmeraldStarEffect(em());
}
示例10: getRainbowHeartEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getRainbowHeartEffect() {
return new RainbowHeartEffect(em());
}
示例11: getInfernoTagEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getInfernoTagEffect(String s) {
return new InfernoTagEffect(em(), s);
}
示例12: getWaterSpoutEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getWaterSpoutEffect() {
return new WaterSpoutEffect(em());
}
示例13: getSparkRingEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getSparkRingEffect() {
return new SparkRingEffect(em());
}
示例14: getFlameBreathEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getFlameBreathEffect() {
return new FlameBreathEffect(em());
}
示例15: getAtomicEffect
import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getAtomicEffect() {
return new AtomicEffect(em());
}