mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 04:33:56 -07:00
Change PortalCreateEvent constructor ArrayList to Collection
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
@@ -4,6 +4,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Called when the world attempts to create a matching end to a portal
|
||||
@@ -12,9 +13,9 @@ public class PortalCreateEvent extends WorldEvent implements Cancellable {
|
||||
private boolean cancel = false;
|
||||
private ArrayList<Block> blocks = new ArrayList<Block>();
|
||||
|
||||
public PortalCreateEvent(final ArrayList<Block> blocks, final World world) {
|
||||
public PortalCreateEvent(final Collection<Block> blocks, final World world) {
|
||||
super(Type.PORTAL_CREATE, world);
|
||||
this.blocks = blocks;
|
||||
this.blocks.addAll(blocks);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user