当前位置: 首页>>代码示例>>Java>>正文


Java Effect类代码示例

本文整理汇总了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!");
    }
}
 
开发者ID:SamaGames,项目名称:Hub,代码行数:21,代码来源:ParticleManager.java

示例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);
    }
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:28,代码来源:ParticleManager.java

示例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);
	}
}
 
开发者ID:benNek,项目名称:AsgardAscension,代码行数:16,代码来源:Ragnorak.java

示例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();
        }
    }
}
 
开发者ID:elBukkit,项目名称:MagicLib,代码行数:11,代码来源:EffectLibManager.java

示例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;
  }
}
 
开发者ID:eyesniper2,项目名称:skRayFall,代码行数:15,代码来源:RayFallEffectManager.java

示例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);
  }
}
 
开发者ID:eyesniper2,项目名称:skRayFall,代码行数:13,代码来源:RayFallEffectManager.java

示例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;
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:45,代码来源:EffectFactory.java

示例8: getBloodHelixEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getBloodHelixEffect() {
    return new BloodHelixEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例9: getEmeraldStarEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getEmeraldStarEffect() {
    return new EmeraldStarEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例10: getRainbowHeartEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getRainbowHeartEffect() {
    return new RainbowHeartEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例11: getInfernoTagEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getInfernoTagEffect(String s) {
    return new InfernoTagEffect(em(), s);
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例12: getWaterSpoutEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getWaterSpoutEffect() {
    return new WaterSpoutEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例13: getSparkRingEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getSparkRingEffect() {
    return new SparkRingEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例14: getFlameBreathEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getFlameBreathEffect() {
    return new FlameBreathEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java

示例15: getAtomicEffect

import de.slikey.effectlib.Effect; //导入依赖的package包/类
private static Effect getAtomicEffect() {
    return new AtomicEffect(em());
}
 
开发者ID:edasaki,项目名称:ZentrelaRPG,代码行数:4,代码来源:EffectFactory.java


注:本文中的de.slikey.effectlib.Effect类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。