类org.bukkit.Note源码实例Demo

下面列出了怎么用org.bukkit.Note的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: Kettle   文件: CraftNoteBlock.java
@Override
public boolean play(Instrument instrument, Note note) {
    Block block = getBlock();

    if (block.getType() == Material.NOTE_BLOCK) {
        CraftWorld world = (CraftWorld) this.getWorld();
        world.getHandle().addBlockEvent(new BlockPos(getX(), getY(), getZ()), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId());
        return true;
    } else {
        return false;
    }
}
 
源代码2 项目: Thermos   文件: CraftNoteBlock.java
@Override
public boolean play(Instrument instrument, Note note) {
    Block block = getBlock();

    if (block.getType() == Material.NOTE_BLOCK) {
        world.getHandle().addBlockEvent(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId());
        return true;
    } else {
        return false;
    }
}
 
源代码3 项目: Kettle   文件: NotePlayEvent.java
public NotePlayEvent(Block block, Instrument instrument, Note note) {
    super(block);
    this.instrument = instrument;
    this.note = note;
}
 
源代码4 项目: Kettle   文件: NotePlayEvent.java
/**
 * Overrides the {@link Note} to be played.
 *
 * @param note the Note. Has no effect if null.
 */
public void setNote(Note note) {
    if (note != null) {
        this.note = note;
    }
}
 
源代码5 项目: Kettle   文件: CraftNoteBlock.java
@Override
public Note getNote() {
    return new Note(this.getSnapshot().note);
}
 
源代码6 项目: Kettle   文件: CraftNoteBlock.java
@Override
public void setNote(Note note) {
    this.getSnapshot().note = note.getId();
}
 
源代码7 项目: Thermos   文件: CraftNoteBlock.java
public Note getNote() {
    return new Note(note.note);
}
 
源代码8 项目: Thermos   文件: CraftNoteBlock.java
public void setNote(Note n) {
    note.note = n.getId();
}
 
源代码9 项目: Kettle   文件: NoteBlock.java
/**
 * Gets the note.
 *
 * @return The note.
 */
public Note getNote();
 
源代码10 项目: Kettle   文件: NoteBlock.java
/**
 * Set the note.
 *
 * @param note The note.
 */
public void setNote(Note note);
 
源代码11 项目: Kettle   文件: NoteBlock.java
/**
 * Plays an arbitrary note with an arbitrary instrument at the block.
 * <p>
 * If the block represented by this block state is no longer a note block,
 * this will return false.
 *
 * @param instrument The instrument
 * @param note       The note
 * @return true if successful, otherwise false
 * @throws IllegalStateException if this block state is not placed
 * @see Instrument Note
 */
public boolean play(Instrument instrument, Note note);
 
源代码12 项目: Kettle   文件: NotePlayEvent.java
/**
 * Gets the {@link Note} to be played.
 *
 * @return the Note.
 */
public Note getNote() {
    return note;
}
 
 类所在包
 类方法
 同包方法