Added NoteBlock.play(instrument, note).

This commit is contained in:
sk89q 2011-05-02 01:20:15 -07:00
parent 83eecfbd4e
commit 98cea5cd15

View file

@ -42,4 +42,17 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
} }
} }
} }
public boolean play(byte instrument, byte note) {
Block block = getBlock();
synchronized (block) {
if (block.getType() == Material.NOTE_BLOCK) {
world.getHandle().d(getX(), getY(), getZ(), instrument, note);
return true;
} else {
return false;
}
}
}
} }