Package org.bukkit

Examples of org.bukkit.Note


        }

        // Notes
        if (modify instanceof NoteBlock) {
          String[] split = query.getString("metadata").split("\n");
          Note note = new Note(Integer.parseInt(split[1]), Tone.valueOf(split[0]), Boolean.parseBoolean(split[2]));
          ((NoteBlock) modify).setNote(note);
          modify.update(true, false);
        }

        // Records
View Full Code Here


            YamlConfiguration config = new YamlConfiguration();
            // Serialize to config, then store config in database
            config.set("items", items);
            dataStmt.setString(6, config.saveToString());
          } else if (state instanceof NoteBlock) {
            Note note = ((NoteBlock) block.getState()).getNote();
            dataStmt.setString(6, note.getTone().toString() + '\n' + note.getOctave() + '\n' + note.isSharped());
          } else if (state instanceof Jukebox) {
            dataStmt.setString(6, ((Jukebox) block.getState()).getPlaying().toString());
          } else if (state instanceof Skull) {
            dataStmt.setString(6, String.format("%s\n%s\n%s",
                ((Skull) block.getState()).hasOwner() ? ((Skull) block.getState()).getOwner() : "",
View Full Code Here

    }

    @Override
    public void loadNbt(CompoundTag tag) {
        super.loadNbt(tag);
        note = new Note(tag.getByte("note"));
    }
View Full Code Here

        this.note = note;
    }

    @Override
    public void setRawNote(byte note) {
        this.note = new Note(note);
    }
View Full Code Here

  // converts midi events into Note objects
  public static Note midiToNote(ShortMessage smsg)
  {
    assert smsg.getCommand() == ShortMessage.NOTE_ON;
    int semitones = smsg.getData1() - MIDI_BASE_FSHARP % 12;
    return new Note(semitones % 24);
  }
View Full Code Here

TOP

Related Classes of org.bukkit.Note

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.