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


Java EntityCombustEvent.getEntity方法代码示例

本文整理汇总了Java中org.bukkit.event.entity.EntityCombustEvent.getEntity方法的典型用法代码示例。如果您正苦于以下问题:Java EntityCombustEvent.getEntity方法的具体用法?Java EntityCombustEvent.getEntity怎么用?Java EntityCombustEvent.getEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.event.entity.EntityCombustEvent的用法示例。


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

示例1: onEntityCombust

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler
public void onEntityCombust(EntityCombustEvent e) {
	if (e.getEntity() instanceof Player) {
		if (this.playerManager.isFrozen(e.getEntity().getUniqueId())) {
			if (!this.plugin.getConfig().getBoolean("fire-damage")) {
				e.setCancelled(true);
			}
		}
	}
}
 
开发者ID:7rory768,项目名称:SimpleFreeze,代码行数:11,代码来源:EntityCombustListener.java

示例2: onEntityCombustEvent

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
/**
 * Free the pearl if it burns up
 * @param e The event args
 */
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityCombustEvent(EntityCombustEvent e) {
	if (!(e.getEntity() instanceof Item)) {
		return;
	}

	ExilePearl pearl = pearlApi.getPearlFromItemStack(((Item) e.getEntity()).getItemStack());
	if (pearl == null) {
		return;
	}

	pearlApi.log("%s (%s) is being freed. Reason: ExilePearl combusted(lava/fire).", pearl.getPlayerName(), pearl.getPlayerId());
	pearlApi.freePearl(pearl, PearlFreeReason.PEARL_DESTROYED);
}
 
开发者ID:DevotedMC,项目名称:ExilePearl,代码行数:19,代码来源:PlayerListener.java

示例3: onEntityCombust

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGHEST)
public void onEntityCombust(EntityCombustEvent event) {
	if ((event.getEntity() instanceof Zombie))
		// Only apply if the zombie is in an arena world
		if (this.am.isInGame((Zombie) event.getEntity())) {
			event.setCancelled(true);
	}
}
 
开发者ID:odarriba,项目名称:defend-the-village,代码行数:9,代码来源:Main.java

示例4: onEntityCombust

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.LOWEST)
public void onEntityCombust(EntityCombustEvent event) {
	if (event.getEntity() instanceof LivingEntity) {
		if (MobLib.isMobLibEntity((LivingEntity) event.getEntity())) {
			event.setCancelled(true);
		}
	}
}
 
开发者ID:netizen539,项目名称:civcraft,代码行数:9,代码来源:MobLibListener.java

示例5: OnEntityCombustEvent

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR)
public void OnEntityCombustEvent(EntityCombustEvent event) {
	if (!(event.getEntity() instanceof Item)) {
		return;
	}
	
	BonusGoodie goodie = CivGlobal.getBonusGoodie(((Item)event.getEntity()).getItemStack());
	if (goodie == null) {
		return;
	}
	
	goodie.replenish(((Item)event.getEntity()).getItemStack(), (Item)event.getEntity(), null, null);
	
}
 
开发者ID:netizen539,项目名称:civcraft,代码行数:15,代码来源:BonusGoodieManager.java

示例6: onCombustEvent

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler
public void onCombustEvent(EntityCombustEvent e) {
	if(e.getEntity() instanceof Item) {
		Item item = (Item) e.getEntity();
		if(pl.getManagers().getBackPackManager().isBackpack(item.getItemStack())) {
			Backpack pack = pl.getManagers().getBackPackManager().getBackpackByItem(item.getItemStack());
			pack.remove();
		}
	}
}
 
开发者ID:xEssentials,项目名称:xEssentials-deprecated-bukkit,代码行数:11,代码来源:BackpackDespawningEvent.java

示例7: onEntityCombustEvent

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler
public void onEntityCombustEvent(EntityCombustEvent event) {
   if (event.getDuration() == 8 && !(event.getEntity() instanceof Player)) {
      event.setCancelled(true);
   }
}
 
开发者ID:PaulBGD,项目名称:MiniMiniGames,代码行数:7,代码来源:WorldListener.java

示例8: onEntityCombust

import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler
public void onEntityCombust(EntityCombustEvent event){
    if(event.getEntity() instanceof Zombie){
        event.setCancelled(true);
    }
}
 
开发者ID:GaryQian,项目名称:League,代码行数:7,代码来源:GeneralListeners.java


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