summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/BlockChangeDelegate.java
blob: 1ec3177e05aeeb4ba51cf813d1ad915d4cdc8488 (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
39
40
41
42
43
package org.bukkit;

/**
 * A delegate for handling block changes. This serves as a direct interface
 * between generation algorithms in the server implementation and utilizing
 * code.
 *
 * @author sk89q
 */
public interface BlockChangeDelegate {

    /**
     * Set a block type at the specified coordinates.
     *
     * @param x
     * @param y
     * @param z
     * @param typeId
     * @return true if the block was set successfully
     */
    public boolean setRawTypeId(int x, int y, int z, int typeId);

    /**
     * Set a block type and data at the specified coordinates.
     *
     * @param x
     * @param y
     * @param z
     * @param typeId
     * @param data
     * @return true if the block was set successfully
     */
    public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);

    /**
     * Get the block type at the location.
     * @param x
     * @param y
     * @param z
     * @return
     */
    public int getTypeId(int x, int y, int z);
}