當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。