001 package org.bukkit.block; 002 003 import org.bukkit.Instrument; 004 import org.bukkit.Note; 005 006 /** 007 * Represents a note. 008 */ 009 public interface NoteBlock extends BlockState { 010 011 /** 012 * Gets the note. 013 * 014 * @return The note. 015 */ 016 public Note getNote(); 017 018 /** 019 * Gets the note. 020 * 021 * @return The note ID. 022 * @deprecated Magic value 023 */ 024 @Deprecated 025 public byte getRawNote(); 026 027 /** 028 * Set the note. 029 * 030 * @param note The note. 031 */ 032 public void setNote(Note note); 033 034 /** 035 * Set the note. 036 * 037 * @param note The note ID. 038 * @deprecated Magic value 039 */ 040 @Deprecated 041 public void setRawNote(byte note); 042 043 /** 044 * Attempts to play the note at block 045 * <p> 046 * If the block is no longer a note block, this will return false 047 * 048 * @return true if successful, otherwise false 049 */ 050 public boolean play(); 051 052 /** 053 * Plays an arbitrary note with an arbitrary instrument 054 * 055 * @param instrument Instrument ID 056 * @param note Note ID 057 * @return true if successful, otherwise false 058 * @deprecated Magic value 059 */ 060 @Deprecated 061 public boolean play(byte instrument, byte note); 062 063 /** 064 * Plays an arbitrary note with an arbitrary instrument 065 * 066 * @param instrument The instrument 067 * @param note The note 068 * @return true if successful, otherwise false 069 * @see Instrument Note 070 */ 071 public boolean play(Instrument instrument, Note note); 072 }