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


Java AreaEffectCloud类代码示例

本文整理汇总了Java中org.bukkit.entity.AreaEffectCloud的典型用法代码示例。如果您正苦于以下问题:Java AreaEffectCloud类的具体用法?Java AreaEffectCloud怎么用?Java AreaEffectCloud使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AreaEffectCloud类属于org.bukkit.entity包,在下文中一共展示了AreaEffectCloud类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPotionLinger

import org.bukkit.entity.AreaEffectCloud; //导入依赖的package包/类
@EventHandler
public void onPotionLinger(final AreaEffectCloudApplyEvent event) {
    final AreaEffectCloud cloud = event.getEntity();
    if(PotionClassification.classify(cloud) != PotionClassification.HARMFUL) return;

    for(Iterator<LivingEntity> iterator = event.getAffectedEntities().iterator(); iterator.hasNext(); ) {
        final LivingEntity victim = iterator.next();
        final ParticipantState victimState = getMatch().getParticipantState(victim);
        final DamageInfo damageInfo = damageResolver.resolveDamage(EntityDamageEvent.DamageCause.MAGIC, victim, cloud);

        if(victimState != null && queryDamage(event, victimState, damageInfo).isDenied()) {
            iterator.remove();
        }
    }
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:16,代码来源:DamageMatchModule.java

示例2: callLingeringPotionSplashEvent

import org.bukkit.entity.AreaEffectCloud; //导入依赖的package包/类
public static LingeringPotionSplashEvent callLingeringPotionSplashEvent(EntityPotion potion, EntityAreaEffectCloud cloud) {
       ThrownPotion thrownPotion = (ThrownPotion) potion.getBukkitEntity();
       AreaEffectCloud effectCloud = (AreaEffectCloud) cloud.getBukkitEntity();

       LingeringPotionSplashEvent event = new LingeringPotionSplashEvent(thrownPotion, effectCloud);
       Bukkit.getPluginManager().callEvent(event);
       return event;
}
 
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:9,代码来源:CraftEventFactory.java

示例3: effects

import org.bukkit.entity.AreaEffectCloud; //导入依赖的package包/类
public static Collection<PotionEffect> effects(AreaEffectCloud cloud) {
    return effects(cloud.getBasePotionData(), cloud.getCustomEffects());
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:4,代码来源:PotionUtils.java

示例4: callAreaEffectCloudApplyEvent

import org.bukkit.entity.AreaEffectCloud; //导入依赖的package包/类
public static AreaEffectCloudApplyEvent callAreaEffectCloudApplyEvent(EntityAreaEffectCloud cloud, List<LivingEntity> entities) {
	AreaEffectCloudApplyEvent event = new AreaEffectCloudApplyEvent((AreaEffectCloud) cloud.getBukkitEntity(), entities);
	cloud.world.getServer().getPluginManager().callEvent(event);
	return event;
}
 
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:6,代码来源:CraftEventFactory.java


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