mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
Make EntityCreatePortalEvent block list Unmodifiable.
This commit is contained in:
parent
470d9f9e1d
commit
bad3979b8f
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user