Fire NotePlayEvent. Fixes BUKKIT-1779

This commit is contained in:
obnoxint
2012-06-10 17:39:18 +02:00
committed by Travis Watkins
parent 72d64b516c
commit e35f6f2526
2 changed files with 14 additions and 1 deletions

View File

@@ -520,4 +520,10 @@ public class CraftEventFactory {
world.getServer().getPluginManager().callEvent(event);
return event;
}
public static NotePlayEvent callNotePlayEvent(World world, int x, int y, int z, byte instrument, byte note) {
NotePlayEvent event = new NotePlayEvent(world.getWorld().getBlockAt(x, y, z), org.bukkit.Instrument.getByType(instrument), new org.bukkit.Note(note));
world.getServer().getPluginManager().callEvent(event);
return event;
}
}