本文整理汇总了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);
}
}
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
示例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();
}
}
}
示例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);
}
}
示例8: onEntityCombust
import org.bukkit.event.entity.EntityCombustEvent; //导入方法依赖的package包/类
@EventHandler
public void onEntityCombust(EntityCombustEvent event){
if(event.getEntity() instanceof Zombie){
event.setCancelled(true);
}
}