Archiviert
13
0

Make EntityCreatePortalEvent block list Unmodifiable.

Dieser Commit ist enthalten in:
feildmaster 2012-04-02 15:44:19 -05:00
Ursprung 470d9f9e1d
Commit bad3979b8f

Datei anzeigen

@ -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<BlockState>(), 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()) {