@EventHandler(priority = EventPriority.LOWEST) public void onWorldChanged(EntityPortalEnterEvent event) { if (!(event.getEntity() instanceof Tameable) || !(event.getEntity() instanceof LivingEntity)) { return; } OfflinePlayer player = (OfflinePlayer) ((Tameable) event.getEntity()).getOwner(); if (!InventoryManager.playerIsLoaded(player)) { return; } PlayerWrapper playerWrapper = InventoryManager.get(player); if (event.getEntity() == playerWrapper.getPet()) { PetManager.respawnPet(player); } }
public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k)); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.ah(); } }
public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null && !world.isStatic) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k)); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.b(1); } }
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onEntityPortalEnterEvent(final EntityPortalEnterEvent event) { if (event.getEntity() instanceof Player) { final Player player = (Player) event.getEntity(); // Ok so a player enters a portal // Immediately record their location final Location playerLocation = event.getLocation(); this.playerLocationAtEvent.put(player, playerLocation); } }
public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k)); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.ab(); } }
@EventHandler public void handle(EntityPortalEnterEvent event) { if (!Mgr.INSTANCE.isPortalPortal() || !(event.getEntityType() == EntityType.PLAYER) || portal.containsKey(event.getEntity().getUniqueId())) { return; } portal.put(event.getEntity().getUniqueId(), main.run(80, () -> { portal.remove(event.getEntity().getUniqueId()); portalIfPortal((Player) event.getEntity()); })); }
@SuppressWarnings("deprecation") public void EntityPortalEnter(EntityPortalEnterEvent event) { if (event.getEntity().getLocation().getWorld().getName().equals("SkyBlock")) { if (event.getEntity() instanceof Player && getLowestBlock(event.getLocation().getBlock()).getData() != (byte) 2) { getLowestBlock(event.getLocation().getBlock()).setData((byte)2); ((Player) event.getEntity()).getInventory().addItem(new ItemStack(Material.NETHERRACK, 20)); ((Player) event.getEntity()).getInventory().addItem(new ItemStack(Material.NETHER_BRICK, 3)); ((Player) event.getEntity()).getInventory().addItem(new ItemStack(Material.GLOWSTONE_DUST, 10)); ((Player) event.getEntity()).getInventory().addItem(new ItemStack(Material.GHAST_TEAR, 1)); ((Player) event.getEntity()).getInventory().addItem(new ItemStack(Material.SOUL_SAND, 15)); } } }
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) { if (p_149670_5_.ridingEntity == null && p_149670_5_.riddenByEntity == null) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(p_149670_5_.getBukkitEntity(), new org.bukkit.Location(p_149670_1_.getWorld(), p_149670_2_, p_149670_3_, p_149670_4_)); p_149670_1_.getServer().getPluginManager().callEvent(event); // CraftBukkit end p_149670_5_.setInPortal(); } }
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) { if (p_149670_5_.ridingEntity == null && p_149670_5_.riddenByEntity == null && !p_149670_1_.isRemote) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(p_149670_5_.getBukkitEntity(), new org.bukkit.Location(p_149670_1_.getWorld(), p_149670_2_, p_149670_3_, p_149670_4_)); p_149670_1_.getServer().getPluginManager().callEvent(event); // CraftBukkit end p_149670_5_.travelToDimension(1); } }
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) { if (!entity.isPassenger() && !entity.isVehicle() && entity.aV()) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ())); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.e(blockposition); } }
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) { if (!entity.isPassenger() && !entity.isVehicle() && entity.aV() && !world.isClientSide && entity.getBoundingBox().b(iblockdata.c(world, blockposition).a(blockposition))) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ())); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.c(1); } }
public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k)); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.Z(); } }
public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null && !world.isStatic) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k)); world.getServer().getPluginManager().callEvent(event); // CraftBukkit end entity.c(1); } }
@EventHandler public void EntityPortalEnter(EntityPortalEnterEvent event) { if (sbPortalReward != null) sbPortalReward.EntityPortalEnter(event); }
@EventHandler public void onEntityPortal(EntityPortalEnterEvent event) { onEnterPortal(event.getEntity()); }