@EventHandler public Message onBlockAction(BlockActionEvent event) { int id = VanillaMaterials.getMinecraftId(event.getMaterial()); if (id == -1) { return null; } else { return new BlockActionMessage( event.getBlock(), (short) id, event.getData1(), event.getData2()); } }
public void play(List<Player> players, Point position, BlockMaterial material) { int id = VanillaMaterials.getMinecraftId(material); if (id != -1) { this.play(players, position, id); } }