MCPcopy Create free account
hub / github.com/PaperMC/Paper / flat

Method flat

paper-api/src/main/java/org/bukkit/Note.java:170–175  ·  view source on GitHub ↗

Creates a new note for a flat tone, such as A-flat. @param octave The octave where the note is in. Has to be 0 - 1. @param tone The tone within the octave. @return The new note.

(int octave, @NotNull Tone tone)

Source from the content-addressed store, hash-verified

168 * @return The new note.
169 */
170 @NotNull
171 public static Note flat(int octave, @NotNull Tone tone) {
172 Preconditions.checkArgument(octave != 2, "Octave cannot be 2 for flats");
173 tone = tone == Tone.G ? Tone.F : Tone.values()[tone.ordinal() - 1];
174 return new Note(octave, tone, tone.isSharpable());
175 }
176
177 /**
178 * Creates a new note for a sharp tone, such as A-sharp.

Callers 3

createNoteFlatMethod · 0.95
testFlatWrappingMethod · 0.95

Calls 3

isSharpableMethod · 0.80
valuesMethod · 0.65
ordinalMethod · 0.65

Tested by 3

createNoteFlatMethod · 0.76
testFlatWrappingMethod · 0.76