From bad3979b8f528d3df96a97adc0e352b9025d82f0 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Mon, 2 Apr 2012 15:44:19 -0500 Subject: Make EntityCreatePortalEvent block list Unmodifiable. --- src/main/java/net/minecraft/server/EntityEnderDragon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java index 198c108f..f8aeae07 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -574,8 +574,7 @@ public class EntityEnderDragon extends EntityComplex { byte b1 = 4; // CraftBukkit start - Replace any "this.world" in the following with just "world"! - org.bukkit.event.entity.EntityCreatePortalEvent event = new org.bukkit.event.entity.EntityCreatePortalEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), new ArrayList(), org.bukkit.PortalType.ENDER); - org.bukkit.craftbukkit.util.BlockStateListPopulator world = new org.bukkit.craftbukkit.util.BlockStateListPopulator(this.world.getWorld(), event.getBlocks()); + org.bukkit.craftbukkit.util.BlockStateListPopulator world = new org.bukkit.craftbukkit.util.BlockStateListPopulator(this.world.getWorld()); for (int k = b0 - 1; k <= b0 + 32; ++k) { for (int l = i - b1; l <= i + b1; ++l) { @@ -611,6 +610,7 @@ public class EntityEnderDragon extends EntityComplex { world.setTypeId(i, b0 + 3, j, Block.BEDROCK.id); world.setTypeId(i, b0 + 4, j, Block.DRAGON_EGG.id); + org.bukkit.event.entity.EntityCreatePortalEvent event = new org.bukkit.event.entity.EntityCreatePortalEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), java.util.Collections.unmodifiableList(world.getList()), org.bukkit.PortalType.ENDER); this.world.getServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { -- cgit v1.2.3