blob: 26f357353bb550c69bc2ddf09bfd76bcb9d16069 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package org.bukkit.event.world;
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
*/
@SuppressWarnings("serial")
public class PortalCreateEvent extends WorldEvent implements Cancellable {
private boolean cancel = false;
private ArrayList<Block> blocks = new ArrayList<Block>();
public PortalCreateEvent(final Collection<Block> blocks, final World world) {
super(Type.PORTAL_CREATE, world);
this.blocks.addAll(blocks);
}
/**
* Gets an array list of all the blocks associated with the created portal
*
* @return array list of all the blocks associated with the created portal
*/
public ArrayList<Block> getBlocks() {
return this.blocks;
}
public boolean isCancelled() {
return cancel;
}
public void setCancelled(boolean cancel) {
this.cancel = cancel;
}
}
|