Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 61 lines 1.2 kB view raw
1package org.bukkit.block; 2 3import org.bukkit.Instrument; 4import org.bukkit.Note; 5 6/** 7 * Represents a note. 8 */ 9public interface NoteBlock extends BlockState { 10 11 /** 12 * Gets the note. 13 * 14 * @return 15 */ 16 public Note getNote(); 17 18 /** 19 * Gets the note. 20 * 21 * @return 22 */ 23 public byte getRawNote(); 24 25 /** 26 * Set the note. 27 * 28 * @param note 29 */ 30 public void setNote(Note note); 31 32 /** 33 * Set the note. 34 * 35 * @param note 36 */ 37 public void setRawNote(byte note); 38 39 /** 40 * Attempts to play the note at block<br /> 41 * <br /> 42 * If the block is no longer a note block, this will return false 43 * 44 * @return true if successful, otherwise false 45 */ 46 public boolean play(); 47 48 /** 49 * Plays an arbitrary note with an arbitrary instrument 50 * 51 * @return true if successful, otherwise false 52 */ 53 public boolean play(byte instrument, byte note); 54 55 /** 56 * Plays an arbitrary note with an arbitrary instrument 57 * 58 * @return true if successful, otherwise false 59 */ 60 public boolean play(Instrument instrument, Note note); 61}