Package org.bukkit
Class Note
java.lang.Object
org.bukkit.Note
A note class to store a specific note.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic NoteCreates a new note for a flat tone, such as A-flat.bytegetId()Deprecated.Magic valueintReturns the octave of this note.floatgetPitch()Gets the pitch of this note.getTone()Returns the tone of this note.inthashCode()booleanReturns if this note is sharped.static NoteCreates a new note for a natural tone, such as A-natural.static NoteCreates a new note for a sharp tone, such as A-sharp.sharped()toString()
- 
Constructor Details- 
Notepublic Note(int note) Creates a new note.- Parameters:
- note- Internal note id.- getId()always return this value. The value has to be in the interval [0; 24].
 
- 
NoteCreates a new note.- Parameters:
- octave- The octave where the note is in. Has to be 0 - 2.
- tone- The tone within the octave. If the octave is 2 the note has to be F#.
- sharped- Set if the tone is sharped (e.g. for F#).
 
 
- 
- 
Method Details- 
flatCreates a new note for a flat tone, such as A-flat.- Parameters:
- octave- The octave where the note is in. Has to be 0 - 1.
- tone- The tone within the octave.
- Returns:
- The new note.
 
- 
sharpCreates a new note for a sharp tone, such as A-sharp.- Parameters:
- octave- The octave where the note is in. Has to be 0 - 2.
- tone- The tone within the octave. If the octave is 2 the note has to be F#.
- Returns:
- The new note.
 
- 
naturalCreates a new note for a natural tone, such as A-natural.- Parameters:
- octave- The octave where the note is in. Has to be 0 - 1.
- tone- The tone within the octave.
- Returns:
- The new note.
 
- 
sharped- Returns:
- The note a semitone above this one.
 
- 
flattened- Returns:
- The note a semitone below this one.
 
- 
getIdDeprecated.Magic valueReturns the internal id of this note.- Returns:
- the internal id of this note.
 
- 
getOctavepublic int getOctave()Returns the octave of this note.- Returns:
- the octave of this note.
 
- 
getToneReturns the tone of this note.- Returns:
- the tone of this note.
 
- 
isSharpedpublic boolean isSharped()Returns if this note is sharped.- Returns:
- if this note is sharped.
 
- 
getPitchpublic float getPitch()Gets the pitch of this note. This is the value used withWorld.playSound(org.bukkit.Location, org.bukkit.Sound, float, float)or the /playsound command.- Returns:
- the pitch
 
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
 
-