mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Change PortalCreateEvent constructor ArrayList to Collection
This commit is contained in:
parent
9e51583ca2
commit
762e66b69b
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ import org.bukkit.block.Block;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the world attempts to create a matching end to a portal
|
* 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 boolean cancel = false;
|
||||||
private ArrayList<Block> blocks = new ArrayList<Block>();
|
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);
|
super(Type.PORTAL_CREATE, world);
|
||||||
this.blocks = blocks;
|
this.blocks.addAll(blocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue