3030import  org .bukkit .plugin .Plugin ;
3131import  org .bukkit .scheduler .BukkitRunnable ;
3232import  org .bukkit .scheduler .BukkitTask ;
33+ import  org .jetbrains .annotations .NotNull ;
34+ import  org .jetbrains .annotations .Nullable ;
3335
34- import  javax .annotation .Nonnull ;
35- import  javax .annotation .Nullable ;
3636import  java .io .BufferedReader ;
3737import  java .io .IOException ;
3838import  java .nio .charset .StandardCharsets ;
@@ -118,8 +118,8 @@ public final class NoteBlockMusic {
118118    private  NoteBlockMusic () {
119119    }
120120
121-     @ Nonnull 
122-     public  static  XSound  getSoundFromInstrument (@ Nonnull  Instrument  instrument ) {
121+     @ NotNull 
122+     public  static  XSound  getSoundFromInstrument (@ NotNull  Instrument  instrument ) {
123123        return  INSTRUMENT_TO_SOUND .get (instrument );
124124    }
125125
@@ -167,7 +167,7 @@ public static Note.Tone getNoteTone(char ch) {
167167     * @return the async task handling the notes. 
168168     * @since 1.0.0 
169169     */ 
170-     public  static  CompletableFuture <Void > testMusic (@ Nonnull  Player  player ) {
170+     public  static  CompletableFuture <Void > testMusic (@ NotNull  Player  player ) {
171171        return  playMusic (player , player ::getLocation , // Starting piece of Megalovania (not perfectly toned, it's screwed up) 
172172                "PIANO,D,2,100 PIANO,B#1 200 PIANO,F 250 PIANO,E 250 PIANO,B 200 PIANO,A 100 PIANO,B 100 PIANO,E" );
173173    }
@@ -183,7 +183,7 @@ public static CompletableFuture<Void> testMusic(@Nonnull Player player) {
183183     * @see #playMusic(Player, Supplier, String) 
184184     * @since 1.0.0 
185185     */ 
186-     public  static  CompletableFuture <Void > fromFile (@ Nonnull  Player  player , @ Nonnull  Supplier <Location > location , @ Nonnull  Path  path ) {
186+     public  static  CompletableFuture <Void > fromFile (@ NotNull  Player  player , @ NotNull  Supplier <Location > location , @ NotNull  Path  path ) {
187187        return  CompletableFuture .runAsync (() -> {
188188            try  (BufferedReader  reader  = Files .newBufferedReader (path , StandardCharsets .UTF_8 )) {
189189                String  line ;
@@ -244,7 +244,7 @@ public static CompletableFuture<Void> fromFile(@Nonnull Player player, @Nonnull
244244     * @see #fromFile(Player, Supplier, Path) 
245245     * @since 1.0.0 
246246     */ 
247-     public  static  CompletableFuture <Void > playMusic (@ Nonnull  Player  player , @ Nonnull  Supplier <Location > location , @ Nullable  String  script ) {
247+     public  static  CompletableFuture <Void > playMusic (@ NotNull  Player  player , @ NotNull  Supplier <Location > location , @ Nullable  String  script ) {
248248        // We don't want to mess around in the main thread. 
249249        // Sounds are thread-safe. 
250250        return  CompletableFuture .runAsync (() -> {
@@ -257,7 +257,7 @@ public static CompletableFuture<Void> playMusic(@Nonnull Player player, @Nonnull
257257        });
258258    }
259259
260-     public  static  Sequence  parseInstructions (@ Nonnull  CharSequence  script ) {
260+     public  static  Sequence  parseInstructions (@ NotNull  CharSequence  script ) {
261261        return  new  InstructionBuilder (script ).sequence ;
262262    }
263263
@@ -299,7 +299,7 @@ private static void sleep(long fermata) {
299299     * @since 3.0.0 
300300     */ 
301301    @ Nullable 
302-     public  static  Note  parseNote (@ Nonnull  String  note ) {
302+     public  static  Note  parseNote (@ NotNull  String  note ) {
303303        Note .Tone  tone  = getNoteTone ((char ) (note .charAt (0 ) & 0x5f )); // Doesn't matter if it's already uppercase. 
304304        if  (tone  == null ) return  null ;
305305
@@ -336,7 +336,7 @@ private static boolean isDigit(char ch) {
336336    }
337337
338338    @ SuppressWarnings ("deprecation" )
339-     public  static  float  noteToPitch (@ Nonnull  Note  note ) {
339+     public  static  float  noteToPitch (@ NotNull  Note  note ) {
340340        return  (float ) Math .pow (2.0D , ((double ) note .getId () - 12.0D ) / 12.0D );
341341    }
342342
@@ -422,7 +422,7 @@ protected char checkup(char ch) {
422422
423423    @ SuppressWarnings ("StringBufferField" )
424424    private  static  final  class  InstructionBuilder  {
425-         @ Nonnull  final  CharSequence  script ;
425+         @ NotNull  final  CharSequence  script ;
426426        final  int  len ;
427427        final  StringBuilder 
428428                instrumentBuilder  = new  StringBuilder (10 ),
@@ -436,7 +436,7 @@ private static final class InstructionBuilder {
436436        StringBuilder  currentBuilder ;
437437
438438
439-         public  InstructionBuilder (@ Nonnull  CharSequence  script ) {
439+         public  InstructionBuilder (@ NotNull  CharSequence  script ) {
440440            this .script  = script ;
441441            len  = script .length ();
442442
@@ -665,8 +665,8 @@ public String toString() {
665665     * @return the async task handling the operation. 
666666     * @since 2.0.0 
667667     */ 
668-     @ Nonnull 
669-     public  static  BukkitTask  playAscendingNote (@ Nonnull  Plugin  plugin , @ Nonnull  Player  player , @ Nonnull  Entity  playTo , @ Nonnull  Instrument  instrument ,
668+     @ NotNull 
669+     public  static  BukkitTask  playAscendingNote (@ NotNull  Plugin  plugin , @ NotNull  Player  player , @ NotNull  Entity  playTo , @ NotNull  Instrument  instrument ,
670670                                               int  ascendLevel , int  delay ) {
671671        Objects .requireNonNull (player , "Cannot play note from null player" );
672672        Objects .requireNonNull (playTo , "Cannot play note to null entity" );
0 commit comments