summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/block/NoteBlock.java
blob: 14bb68baea74ea4fc8949f99f70afb4e10b842cb (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package org.bukkit.block;

import org.bukkit.Instrument;
import org.bukkit.Note;

/**
 * Represents a captured state of a note block.
 * @deprecated not a tile entity in future versions of Minecraft
 */
@Deprecated
public interface NoteBlock extends BlockState {

    /**
     * Gets the note.
     *
     * @return The note.
     */
    public Note getNote();

    /**
     * Gets the note.
     *
     * @return The note ID.
     * @deprecated Magic value
     */
    @Deprecated
    public byte getRawNote();

    /**
     * Set the note.
     *
     * @param note The note.
     */
    public void setNote(Note note);

    /**
     * Set the note.
     *
     * @param note The note ID.
     * @deprecated Magic value
     */
    @Deprecated
    public void setRawNote(byte note);

    /**
     * Attempts to play the note at the block.
     * <p>
     * If the block represented by this block state is no longer a note block,
     * this will return false.
     *
     * @return true if successful, otherwise false
     * @throws IllegalStateException if this block state is not placed
     */
    public boolean play();

    /**
     * Plays an arbitrary note with an arbitrary instrument at the block.
     * <p>
     * If the block represented by this block state is no longer a note block,
     * this will return false.
     *
     * @param instrument Instrument ID
     * @param note Note ID
     * @return true if successful, otherwise false
     * @throws IllegalStateException if this block state is not placed
     * @deprecated Magic value
     */
    @Deprecated
    public boolean play(byte instrument, byte note);

    /**
     * Plays an arbitrary note with an arbitrary instrument at the block.
     * <p>
     * If the block represented by this block state is no longer a note block,
     * this will return false.
     *
     * @param instrument The instrument
     * @param note The note
     * @return true if successful, otherwise false
     * @throws IllegalStateException if this block state is not placed
     * @see Instrument Note
     */
    public boolean play(Instrument instrument, Note note);
}