@EventHandler public void onPortal(EntityCreatePortalEvent e) { if (e.getPortalType() == PortalType.ENDER && e.getEntity().getType() == EntityType.ENDER_DRAGON) if (QuestManagerPlugin.questManagerPlugin.getPluginConfiguration().getWorlds().contains( e.getEntity().getWorld().getName())) { e.setCancelled(true); return; } }
public EntityCreatePortalEvent(final LivingEntity what, final List<BlockState> blocks, final PortalType type) { super(what); this.blocks = blocks; this.type = type; }
@Override public PortalType getPortalType() { throw new NotImplementedException("TODO"); }
public EntityCreatePortalEvent(LivingEntity what, List<BlockState> blocks, PortalType type) { }
public PortalType getPortalType() { return null; }
/** * Gets the type of portal that is trying to be created. * * @return Type of portal. */ public PortalType getPortalType() { return type; }