Java 类org.bukkit.event.entity.EntityPortalExitEvent 实例源码

项目:LoginTeleport    文件:Executor.java   
@EventHandler
public void handle(EntityPortalExitEvent event) {
    val remove = portal.remove(event.getEntity().getUniqueId());
    if (!nil(remove)) {
        remove.cancel();
    }
}
项目:TradeCraft    文件:TradeCraftListener.java   
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void EntityPortalExitEvent(EntityPortalExitEvent  event)
{
    if (event.getEntityType() == EntityType.VILLAGER)
    {
        final Entity villager = event.getEntity();
        TradeCraftVillager tcv = Villagers.getVillager(villager.getUniqueId().toString());
        if(tcv != null)
        {
            Logs.debug("portal exit " + tcv.getUUID());
            tcv.setPortaling(false);
        }
    }
}